From: Fernando Nasser <fnasser@redhat.com>
To: Insight List <insight@sources.redhat.com>
Subject: PlugIn -- sample
Date: Mon, 29 Jan 2001 07:20:00 -0000 [thread overview]
Message-ID: <3A7589AA.2D39BE80@redhat.com> (raw)
Here is a sample "plugins" subdirectory. I am still writting the README
file
and the sample is still a very simple one. But it gives an idea of how
things work. I will try to come up with a PlugIn class today.
I wonder if we should install the plugins directory or not. I will
write a target
"install-plugins" and we can decide later if we should install this by
default.
BTW, the installer of a plugin is supposed to append to some of the
files below
in addition to add its own subdirectory and a package activation file to
the
plug-ins directory itself. But this is done in the installed tree as
these plug-ins
are (mostly) not distributed with Insight (we may "adopt" a few plug-ins
that are
generic enough, for which there is an assignment and a maintainer that
can commit to
a long term care of the child).
Suggestion for improvements are welcome, specially if accompanied with
some
volunteering offer ;-)
* library/plugins: New directory. Sample plug-in directory to help
developers of Insight plug-ins. See README file in that directory.
I will post the README file soon.
* library/plugins/plugins.tcl: New file. Sample version of a code
fragment file which adds entries to the PlugIn menu of the Source
Window to activate custom plug-in windows.
$ cat plugins.tcl
# Add your window to the PlugIn menu here
# Dont forget to add your packet as well
if {1} { #test here if your target is configured
# Uncomment this when the PlugIn class is ready
#package require PLUGIN 1.0
package require RHABOUT 1.0
$Menu menubar_add_menu_command Other "About Red Hat" \
{ManagedWin::open RHAbout -transient} \
-underline 0
# To activate the PlugIn sample, uncomment the next line
#set plugins_available 1
}
* library/plugins/pkgIndex.tcl: New file. Sample version of a file
with package information for the installed plug-ins.
$ cat pkgIndex.tcl
package ifneeded RHABOUT 1.0 [list source [file join $dir rhabout.tcl]]
* library/plugins/rhabout.tcl: New file. Sample file providing a
plug-in package.
$ cat rhabout.tcl
package provide RHABOUT 1.0
set dirname [file dirname [info script]]
lappend auto_path [file join $dirname rhabout]
* library/plugins/rhabout: New directory. Sample plug-in.
There will be one directory for each plugin that is developed.
* library/plugins/rhabout/rhabout.itcl: New file. Sample class
implementing a plug-in window.
Just about.tcl with the class renamed. As I said, we do need a more
complex example.
* library/plugins/rhabout/tclIndex: New file. Tcl index for the sample
plug-in implementation.
# Tcl autoload index file, version 2.0
# This file is generated by the "auto_mkindex" command
# and sourced to set up indexing information for one or
# more commands. Typically each line is a command that
# sets an element in the auto_index array, where the
# element name is the name of a command and the value is
# a script that loads the command.
set auto_index(RHAbout) [list source [file join $dir rhabout.itcl]]
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9
reply other threads:[~2001-01-29 7:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3A7589AA.2D39BE80@redhat.com \
--to=fnasser@redhat.com \
--cc=insight@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).