summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
aac5a36)
Now if your prompt contains an underscore, it'll look weird. Nobody's
doing that, right?
+xtoys (1.4.2) experimental; urgency=low
+
+ * xgetline: Mnemonic for the main entry box.
+
+ -- Mark Wooding <mdw@distorted.org.uk> Sun, 21 Mar 2010 11:27:56 +0000
+
xtoys (1.4.1) experimental; urgency=low
* xcatch: don't destroy contents of window when it's closed.
xtoys (1.4.1) experimental; urgency=low
* xcatch: don't destroy contents of window when it's closed.
-cmd=$(xgetline -t "Shell command in window" -p "Command:") &&
+cmd=$(xgetline -t "Shell command in window" -p "_Command:") &&
xterm -T "$cmd" -e sh -c "$cmd"
.ft R
.fi
xterm -T "$cmd" -e sh -c "$cmd"
.ft R
.fi
.BI "\-p, \-\-prompt " prompt
Sets the prompt string in the dialogue box to
.IR prompt .
.BI "\-p, \-\-prompt " prompt
Sets the prompt string in the dialogue box to
.IR prompt .
-The default is to have no prompt string.
+If the prompt string contains an underscore character
+.RB ` _ ',
+then the following character appears underlined; pressing Alt and the
+leftmost underlined character (the `mnemonic') moves the input focus to
+the entry widget. If you want a literal underscore, type two
+consecutive underscores. The default is to have no prompt string.
.TP 5
.BI "\-t, \-\-title " title
Sets the title of the dialogue box to
.TP 5
.BI "\-t, \-\-title " title
Sets the title of the dialogue box to
box.set_border_width(4)
win.add(box)
box.set_border_width(4)
win.add(box)
- ## If we have a prompt, insert it.
- if opts.prompt is not None:
- box.pack_start(GTK.Label(opts.prompt), False)
-
## Choose the appropriate widget.
if opts.file is None:
entry = SimpleEntry()
## Choose the appropriate widget.
if opts.file is None:
entry = SimpleEntry()
+ ## If we have a prompt, insert it.
+ if opts.prompt is not None:
+ label = GTK.Label(opts.prompt)
+ label.set_properties(mnemonic_widget = entry,
+ use_underline = True)
+ box.pack_start(label, False)
+
## Insert the widget and configure it.
box.pack_start(entry, True)
if opts.default == '@':
## Insert the widget and configure it.
box.pack_start(entry, True)
if opts.default == '@':