Re: panel run dialog



[ I'm just catching up on a huge backlog in my inbox, therefore this mail
comes a little bit late. ]

Mark McLoughlin <mark skynet ie> wrote:
> 	I'm getting quite a few comments that the list of applications
> in the run dialog isn't useful and just slows down the dialog e.g.
[...]

FWIW: When I first wanted to get familiar with Gnome-/Gtk-programming
(sometime at the beginning of the year) I started to write a replacement
for the old version of that dialog.  I never really got past the basic
framework and interface of the program.  But while I see some basic issues
with the overall design of that program, I also think that it's still
interesting in at least some ways.  That's the reason why I thought I'd
write this mail.

(The program is, btw, more or less my first non-`hello world'-style
program in general.  One additional reasons for me to get distracted from
working on it, aside from not feeling completely comfortable with the
overall design, was that over time I saw several problems with my way of
implementing it.)

Anyway... ProgLaunch (that's how I named the program) has basically the
same interface as the old Run-dialog.  One addition to the interface is a
`More Options >>' button to the right of the `Run program in terminal'
checkbox.  (In ProgLaunch the option that is visible in this `compact
view' is actually the first of all the available options and mustn't
necessarily be `Run in terminal'.)  When the button is used the dialog
expands and gives access to (surprise!) several additional options:

  [ ] Run program in terminal / [ ] Close terminal on exit
  [ ] Run program in custom environment
  [ ] Run program as user <foo>
  [ ] Renice process to NN
  [ ] Launch another program    (i.e. don't close the dialog)
  ...

The other (and perhaps more controversial) change is the way that
arguments to the launched program are handled.  Instead of appending the
arguments to the command itself (as we do in a shell) there is another
button to the right of the command-entry (after the `Browse...' button)
labeled `Add Argument'.  Everytime this button is pressed it inserts a
new hbox below the command-entry with the following widgets:

  * an OptionMenu to select the type of the argument
  * a text-entry
  * zero or more argument-type dependent buttons (e.g. a button to launch
    a file-selector for the `Literal string' type or a button to expand a
    pattern for glob-style arguments)
  * a button to close the argument

The argument types are meant to allow special arguments to be processed in
certain ways before passing them to the launched program.  The only type
that is currently implemented, apart from the `Literal string' type, is a
`Brace expression' type that expands the inserted text just as bash's
brace-expansion does.  Other examples of types that might be implement
are: basic globbing (with * and ?), advanced shell patterns, command
substitution, file substitution, etc.

To allow people to get an idea of how the dialog looks like I now created
a web-page with some screenshots of ProgLaunch in "action":

  <http://me.in-berlin.de/~lars/proglaunch/>

You can also download the source from that page, or directly through the
following link (please note however that ProgLaunch is nowhere near
finished and doesn't even launch programs in it's current state!):

  <http://me.in-berlin.de/~lars/proglaunch/proglaunch.tar.gz>

Compiling the program with gtk1.2 should work without any problems.  It
also basically works with gtk2.0 (if you swap the LDFLAGS/CFLAGS lines in
the Makefile) but I'm not sure whether it's really correctly ported.
There also appears a strange display problem with the compiled program
that I'm not sure whether it's a problem of gtk2.0 or myself.  Please see
the screenshots for an example.

Another note: If you want to actually *read* the source you do so
_completely at you own risk_! :)

If there are any more questions I'll be happy to answer them!

Regards,
Lars

PS: I'm sorry for any strange wordings in this mail; my english writing
    style is even worse than my german one!

-- 
[ Lars Weber ]------< me @ lars.in-berlin.de >----[ GPG-ID: 1383B42E ]
+++ fingerprint: 44B1 1D23 DD53 E6B2 4AAB 4C36 0323 9141 1383 B42E +++
[ Using GNU ]----< www.gnu.org | www.debian.org >---[ Running Debian ]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]