Added "altprint..." options to affect 'Print' button behavior
(always act like [Alt] is held, never let [Alt] bring up a dialog, or normal behavior). Closes bug 1191193.
This commit is contained in:
parent
a953d54099
commit
d8914de190
6 changed files with 136 additions and 3 deletions
|
|
@ -395,6 +395,15 @@ http://www.newbreedsoftware.com/tuxpaint/
|
|||
a print dialog. (Defaults to KDE's 'kprinter'.) Can be altered
|
||||
via 'altprintcommand' in ~/.tuxpaintrc.
|
||||
|
||||
* Printer dialog (and 'altprintcommand') can be forced to come up
|
||||
all the time (not just when [Alt] is held) via a new
|
||||
"--altprintalways" command-line option (and "altprint=always" config.
|
||||
file option).
|
||||
|
||||
* Similarly, printer dialog can be prevented ([Alt] key has no effect)
|
||||
via a new "--altprintnever" option (and "altprint=never").
|
||||
(Default (where [Alt] must be held to show dialog) is "altprintmod".)
|
||||
|
||||
|
||||
* New translations:
|
||||
-----------------
|
||||
|
|
|
|||
|
|
@ -149,6 +149,28 @@ Windows Users
|
|||
saved to the file "userdata/print.cfg", and used again, as long
|
||||
as the "printcfg" option is set.
|
||||
|
||||
altprint=always
|
||||
|
||||
This causes Tux Paint to always show the printer dialog (or, on
|
||||
Linux/Unix, run the "altprintcommand") when the 'Print' button
|
||||
is clicked. In other words, it's like clicking 'Print' while
|
||||
holding [Alt], except you don't need to hold [Alt] every time.
|
||||
|
||||
altprint=never
|
||||
|
||||
This prevents Tux Paint from ever showing the printer dialog
|
||||
(or, on Linux/Unix, run the "altprintcommand") when the 'Print'
|
||||
button is clicked. In other words, it makes the [Alt] key have
|
||||
no effect when clicking the 'Print' button.
|
||||
|
||||
altprint=mod
|
||||
|
||||
This is the normal, default behavior. Tux Paint shows a printer
|
||||
dialog (or, on Linux/Unix, runs the "altprintcommand"), when the
|
||||
[Alt] key is pressed while the 'Print' button is clicked.
|
||||
Clicking 'Print' without holding [Alt] prints without showing a
|
||||
dialog.
|
||||
|
||||
simpleshapes=yes
|
||||
Disable the rotation step of the 'Shape' tool. Click, drag and
|
||||
release is all that will be needed to draw a shape.
|
||||
|
|
|
|||
|
|
@ -575,6 +575,24 @@ Available Tools
|
|||
|
||||
See the "Options" documentation.)
|
||||
|
||||
Printer Dialog Options
|
||||
|
||||
By default, Tux Paint only shows the printer
|
||||
dialog (or, on Linux/Unix, runs the
|
||||
"altprintcommand", e.g., "kprinter" instead of
|
||||
"lpr") if the [Alt] key is held while clicking
|
||||
the 'Print' button.
|
||||
|
||||
However, this behavior can be changed. You can
|
||||
have the printer dialog always appear by using
|
||||
"--altprintalways" on the command-line, or
|
||||
"altprint=always" in Tux Paint's configuration
|
||||
file. Or, you can prevent the [Alt] key from
|
||||
having any effect by using "--altprintnever",
|
||||
or "altprint=never".
|
||||
|
||||
See the "Options" documentation.)
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
|
||||
Quit
|
||||
|
|
|
|||
|
|
@ -197,6 +197,31 @@ New Breed Software</p>
|
|||
used again, as long as the "printcfg" option is set.</p>
|
||||
</dd>
|
||||
|
||||
<dt><code><b>altprint=always</b></code></dt>
|
||||
<dd>
|
||||
<p>This causes Tux Paint to always show the printer dialog
|
||||
(or, on Linux/Unix, run the "altprintcommand") when the 'Print' button
|
||||
is clicked. In other words, it's like clicking 'Print' while holding
|
||||
<b>[Alt]</b>, except you don't need to hold <b>[Alt]</b> every time.</p>
|
||||
</dd>
|
||||
|
||||
<dt><code><b>altprint=never</b></code></dt>
|
||||
<dd>
|
||||
<p>This prevents Tux Paint from <i>ever</i> showing the printer dialog
|
||||
(or, on Linux/Unix, run the "altprintcommand") when the 'Print' button
|
||||
is clicked. In other words, it makes the <b>[Alt]</b> key have no
|
||||
effect when clicking the 'Print' button.</p>
|
||||
</dd>
|
||||
|
||||
<dt><code><b>altprint=mod</b></code></dt>
|
||||
<dd>
|
||||
<p>This is the normal, default behavior. Tux Paint shows a
|
||||
printer dialog (or, on Linux/Unix, runs the "altprintcommand"),
|
||||
when the <b>[Alt]</b> key is pressed while the 'Print' button is clicked.
|
||||
Clicking 'Print' without holding <b>[Alt]</b> prints without showing
|
||||
a dialog.</p>
|
||||
</dd>
|
||||
|
||||
<dt><code><b>simpleshapes=yes</b></code></dt>
|
||||
<dd>
|
||||
Disable the rotation step of the 'Shape' tool.
|
||||
|
|
|
|||
|
|
@ -808,6 +808,25 @@ New Breed Software</p>
|
|||
documentation.)</p>
|
||||
</dd>
|
||||
|
||||
<dt>Printer Dialog Options</dt>
|
||||
<dd>
|
||||
<p>By default, Tux Paint only shows the printer dialog
|
||||
(or, on Linux/Unix, runs the "altprintcommand", e.g.,
|
||||
"kprinter" instead of "lpr") if the <b>[Alt]</b> key is held
|
||||
while clicking the 'Print' button.</p>
|
||||
|
||||
<p>However, this behavior can be changed. You can have the
|
||||
printer dialog always appear by using
|
||||
"<code>--altprintalways</code>" on the command-line, or
|
||||
"<code>altprint=always</code>" in Tux Paint's configuration
|
||||
file. Or, you can prevent the <b>[Alt]</b> key from having any
|
||||
effect by using "<code>--altprintnever</code>", or
|
||||
"<code>altprint=never</code>".</p>
|
||||
|
||||
<p>See the "<a href="OPTIONS.html"><i>Options</i></a>"
|
||||
documentation.)</p>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
<br clear=all>
|
||||
|
||||
|
|
|
|||
|
|
@ -482,6 +482,12 @@ enum {
|
|||
SAVE_OVER_NO
|
||||
};
|
||||
|
||||
enum {
|
||||
ALTPRINT_MOD,
|
||||
ALTPRINT_ALWAYS,
|
||||
ALTPRINT_NEVER
|
||||
};
|
||||
|
||||
|
||||
enum {
|
||||
STARTER_OUTLINE,
|
||||
|
|
@ -1417,7 +1423,8 @@ static int use_sound, fullscreen, disable_quit, simple_shapes,
|
|||
mousekey_up, mousekey_down, mousekey_left, mousekey_right,
|
||||
dont_do_xor, use_print_config, dont_load_stamps, noshortcuts,
|
||||
no_system_fonts, no_button_distinction,
|
||||
mirrorstamps, disable_stamp_controls, disable_save, ok_to_use_lockfile;
|
||||
mirrorstamps, disable_stamp_controls, disable_save, ok_to_use_lockfile,
|
||||
alt_print_command_default;
|
||||
static int want_alt_printcommand;
|
||||
static int starter_mirrored, starter_flipped;
|
||||
static int recording, playing;
|
||||
|
|
@ -3205,6 +3212,11 @@ static void mainloop(void)
|
|||
|
||||
if (cur_time >= last_print_time + print_delay)
|
||||
{
|
||||
if (alt_print_command_default == ALTPRINT_ALWAYS)
|
||||
want_alt_printcommand = 1;
|
||||
else if (alt_print_command_default == ALTPRINT_NEVER)
|
||||
want_alt_printcommand = 0;
|
||||
else /* ALTPRINT_MOD */
|
||||
want_alt_printcommand = (SDL_GetModState() & KMOD_ALT);
|
||||
|
||||
if (do_prompt_image(PROMPT_PRINT_NOW_TXT,
|
||||
|
|
@ -6188,6 +6200,7 @@ static void show_usage(FILE * f, char * prg)
|
|||
" %s [--printcfg | --noprintcfg]\n"
|
||||
#endif
|
||||
" %s [--printdelay=SECONDS]\n"
|
||||
" %s [--altprintmod | --altprintalways | --altprintnever]\n"
|
||||
" %s [--lang LANGUAGE | --locale LOCALE | --lang help]\n"
|
||||
" %s [--nosysconfig] [--nolockfile]\n"
|
||||
/* " %s [--record FILE | --playback FILE]\n" */
|
||||
|
|
@ -7344,6 +7357,7 @@ static void setup(int argc, char * argv[])
|
|||
simple_shapes = 0;
|
||||
only_uppercase = 0;
|
||||
promptless_save = SAVE_OVER_PROMPT;
|
||||
alt_print_command_default = ALTPRINT_MOD;
|
||||
disable_quit = 0;
|
||||
disable_save = 0;
|
||||
disable_print = 0;
|
||||
|
|
@ -7558,6 +7572,18 @@ static void setup(int argc, char * argv[])
|
|||
{
|
||||
promptless_save = SAVE_OVER_NO;
|
||||
}
|
||||
else if (strcmp(argv[i], "--altprintnever") == 0)
|
||||
{
|
||||
alt_print_command_default = ALTPRINT_NEVER;
|
||||
}
|
||||
else if (strcmp(argv[i], "--altprintalways") == 0)
|
||||
{
|
||||
alt_print_command_default = ALTPRINT_ALWAYS;
|
||||
}
|
||||
else if (strcmp(argv[i], "--altprintmod") == 0)
|
||||
{
|
||||
alt_print_command_default = ALTPRINT_MOD;
|
||||
}
|
||||
else if (strcmp(argv[i], "--uppercase") == 0 || strcmp(argv[i], "-u") == 0)
|
||||
{
|
||||
only_uppercase = 1;
|
||||
|
|
@ -15128,6 +15154,20 @@ static void parse_options(FILE * fi)
|
|||
{
|
||||
promptless_save = SAVE_OVER_NO;
|
||||
}
|
||||
else if (strcmp(str, "altprint=always") == 0)
|
||||
{
|
||||
alt_print_command_default = ALTPRINT_ALWAYS;
|
||||
}
|
||||
else if (strcmp(str, "altprint=mod") == 0)
|
||||
{
|
||||
/* (Default) */
|
||||
|
||||
alt_print_command_default = ALTPRINT_MOD;
|
||||
}
|
||||
else if (strcmp(str, "altprint=never") == 0)
|
||||
{
|
||||
alt_print_command_default = ALTPRINT_NEVER;
|
||||
}
|
||||
else if (strstr(str, "savedir=") == str)
|
||||
{
|
||||
savedir = strdup(str + 8);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue