Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Making an application dockable

by vroom (His Eminence)
on Mar 04, 2002 at 14:40 UTC ( [id://149127]=perlquestion: print w/replies, xml ) Need Help??

vroom has asked for the wisdom of the Perl Monks concerning the following question:

I've got an application that monitors our internet connection at work and displays its current status in the system tray on Windows boxes using Win32::GUI. I would like to modify the application to work under Linux. It would be easy to do using Perl/Tk or a variety of other options however the piece of the puzzle I haven't been able to find is how I can make any of those applications dockable, specifically under Gnome. Anyone have any experience or information on this?

Replies are listed 'Best First'.
Re: Making an application dockable
by count0 (Friar) on Mar 04, 2002 at 19:50 UTC
    The Gtk-Perl package has bindings for libgnomeui, which includes applet-widget support. Install the gtk-perl package and type 'man Gnome::reference' to get the raw syntax doc.

    What this boils down to - you can write true panel applets with Perl. =)

    Here is an example of a Perl panel applet in Gnome (though I hope you don't follow those examples of indirect method invocation ;).
    Over at ORA you'll find a short, and not very in-depth tutorial.

    If you're equally C savy (and here's where the *good* docs are ;), you'll find the panel API reference quite useful; as well the panel applet tutorial.

    But... I must warn you, GNOME 2.0 is under rapid development right now. The gnome folks (and even myself, for some parts ;) are working feverishly to get the bugs squashed. The new versions of GNOME, GTK+, GDK, and GLib provide a significantly changed API, deprecating a great number of things in the old. So those docs above are likely to be severely outdated in a few months when many people are running the new GNOME.
    Anyhow, "proper" panel applets are done a bit differently now, relying more heavily on CORBA.

    So.. in my reccomendation, if the GUI portion of your code is relatively simple, or small.. It should be rather trivial to port it when the time arises. If, however, you have a *lot* of pop up property dialogs, and extensive graphic manipulations... check out the appropriate modules from cvs.gnome.org first and get a feel for the changes.

    Best of luck.. and trust me, Gnome development rocks! ;) Have fun.

    Update: Btw, if you have any specific questions or issues, don't hesitate to email me, mark@sporkstorms.org, as I've worked quite a bit with Gnome applets in Perl and C. There's also a quite responsive gtk-perl list (linked to from the gtk-perl page).
Re: Making an application dockable
by MZSanford (Curate) on Mar 04, 2002 at 15:41 UTC
    I did something similar under Gnome using a hacked up version of one of the test script that came with Gtk.
    from the frivolous to the serious
Re: Making an application dockable
by jepri (Parson) on Mar 04, 2002 at 17:28 UTC
    The easy way is probably to just 'swallow' your app with the 'Panel'->'Add to panel'->'Swallowed app' right click menu option.

    ____________________
    Jeremy
    I didn't believe in evil until I dated it.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://149127]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2024-04-23 19:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found