summaryrefslogtreecommitdiffstats
path: root/perl-install/printerdrake.pm
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2002-02-28 03:39:21 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2002-02-28 03:39:21 +0000
commit9d1ca8b6a5971e7b137428ebbe943ac616ca529b (patch)
treea6f6a842447f3cb0e1c58c66f451ecc69cf567dc /perl-install/printerdrake.pm
parent09239fa296cc96d58667e6b5f0c37618ce930369 (diff)
downloaddrakx-backup-do-not-use-9d1ca8b6a5971e7b137428ebbe943ac616ca529b.tar
drakx-backup-do-not-use-9d1ca8b6a5971e7b137428ebbe943ac616ca529b.tar.gz
drakx-backup-do-not-use-9d1ca8b6a5971e7b137428ebbe943ac616ca529b.tar.bz2
drakx-backup-do-not-use-9d1ca8b6a5971e7b137428ebbe943ac616ca529b.tar.xz
drakx-backup-do-not-use-9d1ca8b6a5971e7b137428ebbe943ac616ca529b.zip
- Fixes/Improvements on Star Office/Open Office support:
o When one switches the spooler, the entries of the printers under the old spooler are removed from Star Office/Open Office o Printers on remote CUPS servers (which are known through broadcasting) can be added to Star Office/Open Office
Diffstat (limited to 'perl-install/printerdrake.pm')
-rw-r--r--perl-install/printerdrake.pm31
1 files changed, 29 insertions, 2 deletions
diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm
index b0c233504..29dd2417f 100644
--- a/perl-install/printerdrake.pm
+++ b/perl-install/printerdrake.pm
@@ -2095,11 +2095,13 @@ sub install_spooler {
if ((!$::testing) &&
(!printer::files_exist((qw(/usr/lib/cups/cgi-bin/printers.cgi
/sbin/ifconfig
- /usr/bin/xpp),
+ /usr/bin/xpp
+ /usr/bin/curl),
($::expert ?
"/usr/share/cups/model/postscript.ppd.gz" : ())
)))) {
$in->do_pkgs->install(('cups', 'net-tools', 'xpp',
+ 'curl',
($::expert ? 'cups-drivers' : ())));
}
# Start daemon
@@ -2223,6 +2225,8 @@ sub setup_default_spooler {
return;
}
if ($printer->{SPOOLER} ne $oldspooler) {
+ # Remove the local printers from Star Office/Open Office
+ printer::removelocalprintersfromapplications($printer);
# Get the queues of this spooler
{
my $w = $in->wait_message('', _("Reading printer data ..."));
@@ -2422,7 +2426,9 @@ sub main {
{title => _("Printerdrake"),
messages =>
($noprinters ? "" :
- _("The following printers are configured. Double-click on a printer to change its settings; to make it the default printer; or to view information about it.")),
+ (($printer->{SPOOLER} eq "cups") ?
+ _("The following printers are configured. Double-click on a printer to change its settings; to make it the default printer; to view information about it; or to make a printer on a remote CUPS server available for Star/Open Office.") :
+ _("The following printers are configured. Double-click on a printer to change its settings; to make it the default printer; or to view information about it."))),
cancel => (""),
ok => (""),
},
@@ -2733,6 +2739,9 @@ What do you want to modify on this printer?",
_("Printer options") : ())) : ()),
(($queue ne $printer->{DEFAULT}) ?
_("Set this printer as the default") : ()),
+ ($printer->{configured}{$queue} ? () :
+ (_("Add this printer to Star/Open Office"),
+ _("Remove this printer from Star/Open Office"))),
_("Print test pages"),
_("Know how to use this printer"),
($printer->{configured}{$queue} ?
@@ -2806,6 +2815,24 @@ What do you want to modify on this printer?",
printer::set_default_printer($printer);
$in->ask_warn(_("Default printer"),
_("The printer \"%s\" is set as the default printer now.", $queue));
+ } elsif ($modify eq _("Add this printer to Star/Open Office")) {
+ if (printer::addcupsremotetoapplications
+ ($printer, $queue)) {
+ $in->ask_warn(_("Adding printer to Star/Open Office"),
+ _("The printer \"%s\" was successfully added to Star/Open Office.", $queue));
+ } else {
+ $in->ask_warn(_("Adding printer to Star/Open Office"),
+ _("Failed to add the printer \"%s\" to Star/Open Office.", $queue));
+ }
+ } elsif ($modify eq _("Remove this printer from Star/Open Office")) {
+ if (printer::removeprinterfromapplications
+ ($printer, $queue)) {
+ $in->ask_warn(_("Removing printer from Star/Open Office"),
+ _("The printer \"%s\" was successfully removed from Star/Open Office.", $queue));
+ } else {
+ $in->ask_warn(_("Removing printer from Star/Open Office"),
+ _("Failed to remove the printer \"%s\" from Star/Open Office.", $queue));
+ }
} elsif ($modify eq _("Print test pages")) {
print_testpages($printer, $in, $upNetwork);
} elsif ($modify eq _("Know how to use this printer")) {