GNOME Swallow Meta-Applet 1.2
Swallow any X application into the Gnome 2 panel. Especially useful
for dock apps.
A very useful feature of orignal Gnome panel was the ability to
"swallow" other programs -- to embed small applications in the panel,
even if the application was not specifically written for Gnome.
Unfortunately, with the release of Gnome 2 this feature was removed.
In a discussion on the Gnome mailing list, it was pointed out that
this could feature could be easily re-added using a specialized
"swallower" applet, and that such as solution would be cleaner and
more modular besides. Despite this, no one (to my knowledge) had yet
written such an applet...
I wrote this because my girlfriend recently upgraded her Debian box
from Gnome 1.4 to 2.2. When she discovered she couldn't use her
rubber ducky CPU monitor ("wmbubble") she was *PISSED*. After
determining that reverting her installation to Gnome 1.4 would be a
huge hassle, I decided to take matters into my own hands :-)
the usual sequence
(sudo) make install
to successfully configure and make, you will need:
* libpanel-applet2-dev (installing this on debian/ubuntu will cause a cascade of dependencies.)
Right click on the Panel, select
Add to Panel->Utility->Swallower Meta-Applet
You will be presented with a dialog box with two text entry fields.
The top field is the name of the applet that will be run. The bottom
field is the name of the window to grab. If you leave this field
blank, Swallower will use the name as the application. When you hit
"Ok", Swallower will start the applet, then grab it and swallow it into
Any swallowed apps on the panel when you log out will be restored the
next time you start Gnome.
If you have an image for your panel background, it will not be
displayed behind the swallowed applet. I attempted to implement this,
but the panel-applet support library seems to be buggy (no other
applets I could find support this either). Solid color backgrounds
Transparent panel backgrounds are also buggy, and switching to a
transparent background and then to different kind of background may
cause the swallower to crash.
Swallowed applets arn't explicitly killed when the applet closes
(although they seem to die anyway, probably because they are losing
their parent window).
Some dock applets do something very weird: they will end up displaying
*two* windows, one of which is correctly swallowed, the other of which
is still under the control of the window manager! "wmbubble" and
"wmfire" both do this. The workaround is to iconify the extra
window :-) If you have any idea how to fix this, please email me!
This program is copyright 2003 Peter Amstutz. It is licenced under
the GNU General Public License.
The code to do the actual window swallowing is based off of code by
Caolan McNamara <Caolan.McNamara@ul.ie>
I wrote the first version of this program in two days, learning how to
program for GTK+ and GNOME from scratch in the process :-)
Tue, 15 Apr 2003 19:51:05 -0400