gnome-panel and libpanel-applet port to dbus

2005-12-30 Thread Carlos Garcia Campos
Hi all, 

during the last days I've been working on porting libpanel-applet from
bonobo to dbus. I have right now enough code to make a proposal. This
port has two main goals:

1.- The first one is the evident one, porting the IPC mechanism used for
the communication between the panel and the applets by using dbus which
is really good and  a modern IPC mechanism. 

2.- The other goal is wrapping the use of that IPC system into the
libpanel-applet so that both the panel and the applets don't need to
know anything about IPC's. If in the future we need to change again the
IPC system we'll only have to port the library, keeping the panel and
(even most important) the applets without modifications. 

I think that one of the most important advantages of using dbus rather
than bonobo is that dbus has a really good glib bindings, so that we can
use the glib types, properties, signals, etc. Writing applets is even
easier and you only need to know GTK+ and libpanel-applet. The panel
code is also simpler and therefore easier to maintain. 

I've attached a patch[1] against gnome-panel CVS HEAD and a tarball[2]
with all of the changes merged. It's requieres dbus 0.60 and intltool
cvs head. 

Since it's a big patch, I'm going to try to explain briefly the contents
of such patch. 

The PanelApplet class is almost the same, used to write applets. I've
added a PanelAppletContainer class which is a container for applets.
It's used by the panel and can be used easily by any other application. 

Localization of the applets available in the system is made by
gnome-applets-manager. It's a simple dbus service also wrapped by the
libpanel-applet. I haven't included it in the patch because it goes in a
directory and I don't know how to include it, but it's in the tarball. I
haven't also included the removed files because they made the patch
bigger and they don't really provide useful information. 

Look at the patch for more implementation details and feel free to make
any comment or whatever you think. 

If it make sense we can make a special cvs branch, continue working on
it there, and merge it into head for gnome 2.15. I also have in mind
writing a patch against gnome-applets since at the moment I've only
ported the gnome-panel package. 

I'm sure I forget something, all kinds of comments will be welcome. 

[1] http://carlosgc.linups.org/files/gnome-panel-dbus.diff
[2] http://carlosgc.linups.org/files/gnome-panel-2.13.4-dbus.tar.gz

Happy new year!
-- 
Carlos Garcia Campos (KaL)
   [EMAIL PROTECTED]
   [EMAIL PROTECTED]
   http://carlosgc.linups.org
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462


signature.asc
Description: Esta parte del mensaje está firmada	digitalmente
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: ALInex - ADSL Modems - Portugal

2005-12-30 Thread Luis Rodrigues
On Fri, 2005-12-30 at 18:16 +, Alan Cox wrote:
> On Gwe, 2005-12-30 at 17:17 +, Luis Rodrigues wrote:
> > 1: if the firmware is not installed show the dialog to the user
> >if it is hal will load it
> 
> Load it meaning "place it on disk in the right place" ?

Yes,  /usr/lib/hotplug/firmware if I remember correctly.

> 
> > 2: setup the modem (run br2684ctl, change some options on /proc, ...)
> > 3: need to dial the concection (using network-admin??)
> 
> In the Fedora case 2 & 3 are handled by the supplied supporting scripts
> and the system-config-network tool. Might be useful to look at how that
> is done in case there are good ideas for making network-admin handle it
> nicely.
Ok, I will take a look at how that is made.

> 
> > 4: have a nice dialog showing we are connected (network-admin, an
> > applet??)
> 
> Also probably bytes sent/received. At least in the UK some of our
> providers now offer cheap but volume limited connections...

In Portugal we also have that. Here they give us a lot of national
traffic and little of international :(
> 
> Alan
> 

Luis

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: Session manager status?

2005-12-30 Thread Rodrigo Moya
On Thu, 2005-12-22 at 12:49 +1100, Jeff Waugh wrote:
> Hey,
> 
> What's the status of the new session manager code? Will this land soon for
> testing in 2.13?
> 
AFAIK, it's still missing some important stuff, like session management,
which makes it not a good option for 2.13/2.14.

Mark would know better though.
-- 
Rodrigo Moya <[EMAIL PROTECTED]>

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: ALInex - ADSL Modems - Portugal

2005-12-30 Thread Alan Cox
On Gwe, 2005-12-30 at 17:17 +, Luis Rodrigues wrote:
> 1: if the firmware is not installed show the dialog to the user
>if it is hal will load it

Load it meaning "place it on disk in the right place" ?

> 2: setup the modem (run br2684ctl, change some options on /proc, ...)
> 3: need to dial the concection (using network-admin??)

In the Fedora case 2 & 3 are handled by the supplied supporting scripts
and the system-config-network tool. Might be useful to look at how that
is done in case there are good ideas for making network-admin handle it
nicely.

> 4: have a nice dialog showing we are connected (network-admin, an
> applet??)

Also probably bytes sent/received. At least in the UK some of our
providers now offer cheap but volume limited connections...

Alan

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: SCons'ified PyGTK

2005-12-30 Thread Gustavo J. A. M. Carneiro
Qui, 2005-12-29 às 18:35 +, Gustavo J. A. M. Carneiro escreveu:
>   Behold! A SCons'ified PyGTK is now available:
> 
> http://www.gnome.org/~gjc/pygtk-2.8.3.tar.gz
> http://www.gnome.org/~gjc/pygtk-scons.diff
> 
>   It needs scons 0.96.91, instead of make.  I had to invest a lot of
> effort and time to make this happen, due to missing functionality in
> base scons.  However, I tried to be careful to split out generic
> functionality into a separate 'scons tool' that could potentically be
> reused outside of PyGTK.  I didn't test it on win32, but in theory it
> should work, with more or less adjustments.
> 
>   Features of this tool include 'dist' and 'distcheck' support, along
> with configure checks for pkg-config modules, python version, python
> headers, etc.  It should be noted that the scons-based tarball is only
> 595K vs the 919K autotools tarball.  The difference is 324K, while the
> scons-0.96.91.tar.gz full source takes 343K.

  Also some interesting timing statistics:

pygtk build method  time (real)
===
scons   1m8s
./configure && make 1m28s
./autogen.sh && make1m34s

  This is on a AMD64 3000+ system with 512 MiB of RAM.

  Regards,

-- 
Gustavo J. A. M. Carneiro
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
The universe is always one step beyond logic.


signature.asc
Description: Esta é uma parte de mensagem	assinada digitalmente
___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list

Re: ALInex - ADSL Modems - Portugal

2005-12-30 Thread Luis Rodrigues
Hal will load the firmware(if it is available),  but we some other
problems: depending on the usb modem we need to initialize diferent
services (eg: for speedtouch we need to start br2684ctl), the user has
the firmware and wants do install it so the modem works (or doesn't know
it is need and we need to inform hi,)

We need to make an user friendly system:
1: if the firmware is not installed show the dialog to the user
   if it is hal will load it
2: setup the modem (run br2684ctl, change some options on /proc, ...)
3: need to dial the concection (using network-admin??)
4: have a nice dialog showing we are connected (network-admin, an
applet??)

Best regards,

Luis

On Fri, 2005-12-30 at 15:56 +, Alan Cox wrote:
> On Gwe, 2005-12-30 at 15:20 +, Richard Hughes wrote:
> > Ahh, I was talking more about firmware like wireless card firmware, that
> > all you have to do is bung it in /lib/firmware and the card magically
> > works. Maybe I've missed the point with ADSL modems -- sorry.
> 
> Ok so what you are proposing is that when you first see the device you
> produce the dialog and then let the user install the firmware, rather
> than relying on the HAL event to load the firmware into the hardware ?
> 
> 
> That makes sense.
> 

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: ALInex - ADSL Modems - Portugal

2005-12-30 Thread Richard Hughes
On Fri, 2005-12-30 at 15:56 +, Alan Cox wrote:
> On Gwe, 2005-12-30 at 15:20 +, Richard Hughes wrote:
> > Ahh, I was talking more about firmware like wireless card firmware, that
> > all you have to do is bung it in /lib/firmware and the card magically
> > works. Maybe I've missed the point with ADSL modems -- sorry.
> 
> Ok so what you are proposing is that when you first see the device you
> produce the dialog and then let the user install the firmware, rather
> than relying on the HAL event to load the firmware into the hardware ?

No, not at all. The firmware loading is all sorted already, but what if
the firmware if not installed on your system? Shouldn't you be told why
your device isn't working and where you can get it?

Richard.

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: ALInex - ADSL Modems - Portugal

2005-12-30 Thread Alan Cox
On Gwe, 2005-12-30 at 15:20 +, Richard Hughes wrote:
> Ahh, I was talking more about firmware like wireless card firmware, that
> all you have to do is bung it in /lib/firmware and the card magically
> works. Maybe I've missed the point with ADSL modems -- sorry.

Ok so what you are proposing is that when you first see the device you
produce the dialog and then let the user install the firmware, rather
than relying on the HAL event to load the firmware into the hardware ?


That makes sense.

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: ALInex - ADSL Modems - Portugal

2005-12-30 Thread Richard Hughes
On Fri, 2005-12-30 at 14:52 +, Alan Cox wrote:
> On Gwe, 2005-12-30 at 13:27 +, Richard Hughes wrote:
> > I pondered this a few months ago -- we need a small application that
> > when hardware is inserted (HAL event) can query a set of xml descriptors
> > and then prompt the user with a libnotify type bubble. Done as a session
> > service, like g-p-m and g-v-m. I think it's sufficiently different to
> > g-v-m to constitute a different service.
> 
> 
> And the modem reboots or gets reset while a user is not logged in losing
> you connectivity until the next login and event gets noticed. Thats why
> the Linux approach is to do this below the user level - not forgetting
> from the fact you can really upset some devices by loading bogus
> firmware and possibly load hacked firmware as an end user with other
> models of operation.

Ahh, I was talking more about firmware like wireless card firmware, that
all you have to do is bung it in /lib/firmware and the card magically
works. Maybe I've missed the point with ADSL modems -- sorry.

Richard.

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: ALInex - ADSL Modems - Portugal

2005-12-30 Thread Alan Cox
On Gwe, 2005-12-30 at 13:27 +, Richard Hughes wrote:
> I pondered this a few months ago -- we need a small application that
> when hardware is inserted (HAL event) can query a set of xml descriptors
> and then prompt the user with a libnotify type bubble. Done as a session
> service, like g-p-m and g-v-m. I think it's sufficiently different to
> g-v-m to constitute a different service.


And the modem reboots or gets reset while a user is not logged in losing
you connectivity until the next login and event gets noticed. Thats why
the Linux approach is to do this below the user level - not forgetting
from the fact you can really upset some devices by loading bogus
firmware and possibly load hacked firmware as an end user with other
models of operation.

Alan

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: ALInex - ADSL Modems - Portugal

2005-12-30 Thread Richard Hughes
On Fri, 2005-12-30 at 12:49 +, Luis Rodrigues wrote:
> On Fri, 2005-12-30 at 00:00 +, Alan Cox wrote:
> > On Iau, 2005-12-29 at 16:24 +, Luis Rodrigues wrote:
> > > What we want is to have a dialog that shows several types os modems, the
> > > users chooses the one he has and we write the apropriate scripts, if it
> > > needs a firmware we would ask the user to enter the location of it.
> > 
> > 
> > I can't speak for non-Linux systems but the Linux 2.6 mentality is that
> > the kernel generates a hot-plug message to load the right firmware and
> > the user space hot plug layer loads the firmware file. Correctly set up
> > it should be invisible to the user barring installing firmware if the
> > firmware cannot be distro shipped
> > 
> 
> I know that, my problem is that we can't ship the firmware bundled with
> our distribution. So we were planing to crate an application similar to
> gnome-volume-manager that would ask for the firmware do the user when
> he/she pluged the modem in.
> 
> We just haven't decided if this is the way to go.

I pondered this a few months ago -- we need a small application that
when hardware is inserted (HAL event) can query a set of xml descriptors
and then prompt the user with a libnotify type bubble. Done as a session
service, like g-p-m and g-v-m. I think it's sufficiently different to
g-v-m to constitute a different service.

This is easy to code, and probably could be done in a few days by an
experienced coder -- but the legal stuff gets in the way, like are we
allowed to ship a file with URL's that point to the firmware? --
different distros have different policies (i.e. do we have to display a
non-GPL warning first) 

Problems with users submitting xml files (like HAL does fdi files) might
also be of concern. Plus the different firmware naming between distros
could be a problem.

I would love to help any such project.

Richard.

(gnome-power-manager maintainer)

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list


Re: ALInex - ADSL Modems - Portugal

2005-12-30 Thread Luis Rodrigues
On Fri, 2005-12-30 at 00:00 +, Alan Cox wrote:
> On Iau, 2005-12-29 at 16:24 +, Luis Rodrigues wrote:
> > What we want is to have a dialog that shows several types os modems, the
> > users chooses the one he has and we write the apropriate scripts, if it
> > needs a firmware we would ask the user to enter the location of it.
> 
> 
> I can't speak for non-Linux systems but the Linux 2.6 mentality is that
> the kernel generates a hot-plug message to load the right firmware and
> the user space hot plug layer loads the firmware file. Correctly set up
> it should be invisible to the user barring installing firmware if the
> firmware cannot be distro shipped
> 

I know that, my problem is that we can't ship the firmware bundled with
our distribution. So we were planing to crate an application similar to
gnome-volume-manager that would ask for the firmware do the user when
he/she pluged the modem in.

We just haven't decided if this is the way to go.

Best regards,

Luis Rodrigues
> 
> 

___
desktop-devel-list mailing list
desktop-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/desktop-devel-list