Hello community,
here is the log from the commit of package yast2-printer
checked in at Thu Oct 23 22:50:00 CEST 2008.
--------
--- yast2-printer/yast2-printer.changes 2008-10-23 11:05:37.000000000 +0200
+++ /d/STABLE/yast2-printer/yast2-printer.changes 2008-10-23 17:35:44.477367000 +0200
@@ -1,0 +2,6 @@
+Thu Oct 23 17:26:41 CEST 2008 - jsmeix@suse.de
+
+- The Add Driver dialog should now work basically.
+- 2.17.26
+
+-------------------------------------------------------------------
@@ -10 +16 @@
- of inherit them from cupsd.conf if not set in printers.conf.
+ of inherit them from cupsd.conf if not set in printers.conf).
calling whatdependson for head-i586
Old:
----
yast2-printer-2.17.25.tar.bz2
New:
----
yast2-printer-2.17.26.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-printer.spec ++++++
--- /var/tmp/diff_new_pack.GK7115/_old 2008-10-23 22:49:29.000000000 +0200
+++ /var/tmp/diff_new_pack.GK7115/_new 2008-10-23 22:49:29.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-printer (Version 2.17.25)
+# spec file for package yast2-printer (Version 2.17.26)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -20,12 +20,12 @@
Url: http://en.opensuse.org/YaST/Modules/Printer
Name: yast2-printer
-Version: 2.17.25
+Version: 2.17.26
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-printer-2.17.25.tar.bz2
+Source0: yast2-printer-2.17.26.tar.bz2
Prefix: /usr
BuildRequires: cups-devel update-desktop-files yast2 yast2-core-devel yast2-devtools yast2-testsuite
Recommends: netcat
@@ -64,7 +64,7 @@
Michal Zugec
%prep
-%setup -n yast2-printer-2.17.25
+%setup -n yast2-printer-2.17.26
%build
%{prefix}/bin/y2tool y2autoconf
@@ -119,13 +119,16 @@
%exclude %{prefix}/share/doc/packages/yast2-printer/README
%changelog
* Thu Oct 23 2008 jsmeix@suse.de
+- The Add Driver dialog should now work basically.
+- 2.17.26
+* Thu Oct 23 2008 jsmeix@suse.de
- In the Policies dialog added checkboxes to apply the policies
to all local queues because the ErrorPolicy and OpPolicy
settings in /etc/cups/printers.conf do of course not change
automatically when the default policies are changed in
/etc/cups/cupsd.conf (unfortunately each queue is set up
with explicite ErrorPolicy and OpPolicy settings instead
- of inherit them from cupsd.conf if not set in printers.conf.
+ of inherit them from cupsd.conf if not set in printers.conf).
- In the Policies dialog added tests whether or not the
dialog is useless (e.g. in case of a "client-only" config)
and disable the widgets if the dialog is useless.
++++++ yast2-printer-2.17.25.tar.bz2 -> yast2-printer-2.17.26.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.25/configure new/yast2-printer-2.17.26/configure
--- old/yast2-printer-2.17.25/configure 2008-10-23 10:51:37.000000000 +0200
+++ new/yast2-printer-2.17.26/configure 2008-10-23 17:28:03.000000000 +0200
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for yast2-printer 2.17.25.
+# Generated by GNU Autoconf 2.61 for yast2-printer 2.17.26.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -574,8 +574,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-printer'
PACKAGE_TARNAME='yast2-printer'
-PACKAGE_VERSION='2.17.25'
-PACKAGE_STRING='yast2-printer 2.17.25'
+PACKAGE_VERSION='2.17.26'
+PACKAGE_STRING='yast2-printer 2.17.26'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1197,7 +1197,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures yast2-printer 2.17.25 to adapt to many kinds of systems.
+\`configure' configures yast2-printer 2.17.26 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1268,7 +1268,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-printer 2.17.25:";;
+ short | recursive ) echo "Configuration of yast2-printer 2.17.26:";;
esac
cat <<\_ACEOF
@@ -1346,7 +1346,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-printer configure 2.17.25
+yast2-printer configure 2.17.26
generated by GNU Autoconf 2.61
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1360,7 +1360,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by yast2-printer $as_me 2.17.25, which was
+It was created by yast2-printer $as_me 2.17.26, which was
generated by GNU Autoconf 2.61. Invocation command line was
$ $0 $@
@@ -2181,7 +2181,7 @@
# Define the identity of the package.
PACKAGE='yast2-printer'
- VERSION='2.17.25'
+ VERSION='2.17.26'
cat >>confdefs.h <<_ACEOF
@@ -2409,7 +2409,7 @@
-VERSION="2.17.25"
+VERSION="2.17.26"
RPMNAME="yast2-printer"
MAINTAINER="Michal Zugec "
@@ -3304,7 +3304,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by yast2-printer $as_me 2.17.25, which was
+This file was extended by yast2-printer $as_me 2.17.26, which was
generated by GNU Autoconf 2.61. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3347,7 +3347,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-yast2-printer config.status 2.17.25
+yast2-printer config.status 2.17.26
configured by $0, generated by GNU Autoconf 2.61,
with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.25/configure.in new/yast2-printer-2.17.26/configure.in
--- old/yast2-printer-2.17.25/configure.in 2008-10-23 10:51:32.000000000 +0200
+++ new/yast2-printer-2.17.26/configure.in 2008-10-23 17:27:55.000000000 +0200
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.16.7 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-printer, 2.17.25, http://bugs.opensuse.org/, yast2-printer)
+AC_INIT(yast2-printer, 2.17.26, http://bugs.opensuse.org/, yast2-printer)
dnl Check for presence of file 'RPMNAME'
AC_CONFIG_SRCDIR([RPMNAME])
@@ -18,7 +18,7 @@
AM_INIT_AUTOMAKE(tar-ustar -Wno-portability)
dnl Important YaST2 variables
-VERSION="2.17.25"
+VERSION="2.17.26"
RPMNAME="yast2-printer"
MAINTAINER="Michal Zugec "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.25/src/autoconfig.ycp new/yast2-printer-2.17.26/src/autoconfig.ycp
--- old/yast2-printer-2.17.25/src/autoconfig.ycp 2008-10-23 09:05:51.000000000 +0200
+++ new/yast2-printer-2.17.26/src/autoconfig.ycp 2008-10-23 13:23:48.000000000 +0200
@@ -84,7 +84,7 @@
{ y2milestone( "entering initAutoconfig with key '%1'", key );
// The whole Autoconfig Settings dialog is useless without having cups-autoconfig installed:
boolean autoconfig_settings_dialog_is_useless = false;
- if( ! Printerlib::TestAndInstallPackage( "cups-autoconfig" ) )
+ if( ! Printerlib::TestAndInstallPackage( "cups-autoconfig", "install" ) )
{ autoconfig_settings_dialog_is_useless = true;
Popup::Error( // Popup::Error message
// Do not change or translate "cups-autoconfig", it is a RPM package name.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.25/src/basicadd.ycp new/yast2-printer-2.17.26/src/basicadd.ycp
--- old/yast2-printer-2.17.25/src/basicadd.ycp 2008-10-23 07:53:54.000000000 +0200
+++ new/yast2-printer-2.17.26/src/basicadd.ycp 2008-10-23 14:05:49.000000000 +0200
@@ -145,7 +145,6 @@
// but the notify option forces UserInput() in this case:
`opt(`notify),
"",
- // Printer::DriverItems( driver_filter_string, true )
[ `item( `id( -1 ), _("Select a driver.") ) ]
)
),
@@ -274,12 +273,8 @@
break;
}
if( ret == `add_driver )
- { Popup::AnyMessage( // Header of a Popup::AnyMessage when "Add Driver" was selected:
- _("Not yet implemented"),
- // Body of a Popup::AnyMessage when the "Add Driver" was selected:
- _("The 'Add Driver' dialog is not yet implemented.")
- );
- continue;
+ { // Exit this dialog and go to the AddDriverDialog via the sequencer in wizards.ycp:
+ break;
}
if( ret == `more_connections )
{ UI::ReplaceWidget( `id(`connection_selection_replace_point),
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.25/src/basicmodify.ycp new/yast2-printer-2.17.26/src/basicmodify.ycp
--- old/yast2-printer-2.17.25/src/basicmodify.ycp 2008-10-23 07:53:54.000000000 +0200
+++ new/yast2-printer-2.17.26/src/basicmodify.ycp 2008-10-23 14:06:33.000000000 +0200
@@ -62,10 +62,9 @@
if( "yes" == Printer::queues[Printer::selected_queues_index,"disabled"]:"" )
{ printing_enabled = false;
}
- // After the "Modify" text the actual queue name is appended
- // so that the result is e.g. "Modify funprinter1".
- // The actual queue name is a system value which cannot be translated.
- string caption = _("Modify") + " " + name;
+ // Title of the Basic Modify Dialog where %1 will be replaced by the queue name.
+ // The actual queue name is a system value which cannot be translated:
+ string caption = sformat( _("Modify %1") , name );
string model = "";
list <string> description_words = splitstring( description, " " );
if( size( description_words ) > 2 )
@@ -529,12 +528,8 @@
break;
}
if( ret == `add_driver )
- { Popup::AnyMessage( // Header of a Popup::AnyMessage when "Add Driver" was selected:
- _("Not yet implemented"),
- // Body of a Popup::AnyMessage when the "Add Driver" was selected:
- _("The 'Add Driver' dialog is not yet implemented.")
- );
- continue;
+ { // Exit this dialog and go to the AddDriverDialog via the sequencer in wizards.ycp:
+ break;
}
if( ret == `driver_options )
{ if( Printer::selected_queues_index < 0
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.25/src/driveradd.ycp new/yast2-printer-2.17.26/src/driveradd.ycp
--- old/yast2-printer-2.17.25/src/driveradd.ycp 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-printer-2.17.26/src/driveradd.ycp 2008-10-23 17:14:15.000000000 +0200
@@ -0,0 +1,322 @@
+/* ------------------------------------------------------------------------------
+ * Copyright (c) 2006 Novell, Inc. All Rights Reserved.
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify it under
+ * the terms of version 2 of the GNU General Public License as published by the
+ * Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, contact Novell, Inc.
+ *
+ * To contact Novell about this file by physical or electronic mail, you may find
+ * current contact information at www.novell.com.
+ * ------------------------------------------------------------------------------
+ */
+
+/**
+ * File: include/printer/driveradd.ycp
+ * Package: Configuration of printer
+ * Summary: Add Driver dialog definition
+ * Authors: Johannes Meixner
+ *
+ * $Id: driveradd.ycp 27914 2006-02-13 14:32:08Z locilka $
+ */
+
+{
+
+textdomain "printer";
+
+import "Label";
+import "Wizard";
+import "Printerlib";
+import "Printer";
+import "Popup";
+
+include "printer/helps.ycp";
+
+/**
+ * AddDriver dialog
+ * @return dialog result
+ */
+any AddDriverDialog()
+{ // Title of the Add Driver Dialog:
+ string caption = _("Add Driver");
+ boolean cups_drivers_installed = Printerlib::TestAndInstallPackage( "cups-drivers", "installed" );
+ boolean gutenprint_installed = Printerlib::TestAndInstallPackage( "gutenprint", "installed" );
+ boolean hplip_installed = Printerlib::TestAndInstallPackage( "hplip", "installed" );
+ boolean manufacturer_PPDs_installed = Printerlib::TestAndInstallPackage( "manufacturer-PPDs", "installed" );
+ boolean filters_installed = Printerlib::TestAndInstallPackage( "filters", "installed" );
+ term contents = `VBox
+ ( `VStretch(),
+ `Left
+ ( `Label
+ ( `id("driver_packages_label"),
+ // Header for a dialog section where the user can
+ // add or remove printer driver packages:
+ _("Add or Remove Printer Driver Packages")
+ )
+ ),
+ `HBox
+ ( `HSpacing( 3 ),
+ `VBox
+ ( `Left
+ ( `CheckBox
+ ( `id("cups-drivers"),
+ // CheckBox to select or un-select the printer driver package cups-drivers.
+ // There is no need to have the package name "cups-drivers" in this text
+ // because it is shown in a separated column to the left of this text.
+ "&cups-drivers: " + _("Various Standard Drivers"),
+ cups_drivers_installed
+ )
+ ),
+ `Left
+ ( `CheckBox
+ ( `id("gutenprint"),
+ // CheckBox to select or un-select the printer driver package gutenprint.
+ // There is no need to have the package name "gutenprint" in this text
+ // because it is shown in a separated column to the left of this text.
+ // Do not change or translate "Gutenprint", it is a open source project name.
+ // Do not change or translate "Gimp-Print", it is a open source project name.
+ "&gutenprint: " + _("Gutenprint/Gimp-Print Driver"),
+ gutenprint_installed
+ )
+ ),
+ `Left
+ ( `CheckBox
+ ( `id("hplip"),
+ // CheckBox to select or un-select the printer driver package hplip.
+ // There is no need to have the package name "hplip" in this text
+ // because it is shown in a separated column to the left of this text.
+ "&hplip: " + _("Driver for HP Printers and All-in-One Devices"),
+ hplip_installed
+ )
+ ),
+ `Left
+ ( `CheckBox
+ ( `id("manufacturer-PPDs"),
+ // CheckBox to select or un-select the printer driver package manufacturer-PPDs.
+ // There is no need to have the package name "manufacturer-PPDs" in this text
+ // because it is shown in a separated column to the left of this text.
+ "&manufacturer-PPDs: " + _("Various PPD Files for PostScript printers"),
+ manufacturer_PPDs_installed
+ )
+ ),
+ `Left
+ ( `CheckBox
+ ( `id("filters"),
+ // CheckBox to select or un-select the printer driver package filters.
+ // There is no need to have the package name "filters" in this text
+ // because it is shown in a separated column to the left of this text.
+ "&filters: " + _("Makeshift Drivers for a Few Particular Printer Models"),
+ filters_installed
+ )
+ )
+ )
+ ),
+ `VStretch(),
+ `Left
+ ( `Label
+ ( `id("ppd_path_label"),
+ // Header for a dialog section where the user can
+ // add a printer description file (PPD file):
+ _("Add a Printer Description File")
+ )
+ ),
+ `HBox
+ ( `HSpacing( 3 ),
+ `Left
+ ( `TextEntry
+ ( `id("ppd_path_input"),
+ // TextEntry to specify the full path of a PPD file:
+ _("Specify the full &path where the printer description file is located:")
+ )
+ )
+ ),
+ `VStretch()
+ );
+ Wizard::SetContentsButtons( caption,
+ contents,
+ HELPS["add_driver_dialog"]:"",
+ Label::BackButton(),
+ // Set a different label for the "next" button
+ // (i.e. the lower right button which results `next as UI::UserInput)
+ // but do not use OKButton because "OK" may have a different meaning
+ // (e.g. something like close the whole module or something like that):
+ Label::AcceptButton()
+ );
+ any ret = nil;
+ while(true)
+ { ret = UI::UserInput();
+ if( ret == `abort || ret == `cancel || ret == `back ) break;
+ if( ret == `next )
+ { // Get the actual settings and values from the dialog:
+ boolean cups_drivers_install = (boolean)UI::QueryWidget( `id("cups-drivers"), `Value );
+ boolean gutenprint_install = (boolean)UI::QueryWidget( `id("gutenprint"), `Value );
+ boolean hplip_install = (boolean)UI::QueryWidget( `id("hplip"), `Value );
+ boolean manufacturer_PPDs_install = (boolean)UI::QueryWidget( `id("manufacturer-PPDs"), `Value );
+ boolean filters_install = (boolean)UI::QueryWidget( `id("filters"), `Value );
+ string ppd_path_input_value = (string)UI::QueryWidget( `id("ppd_path_input"), `Value );
+ // Ignore an effectively empty ppd_path_input_value:
+ if( cups_drivers_install == cups_drivers_installed
+ && gutenprint_install == gutenprint_installed
+ && hplip_install == hplip_installed
+ && manufacturer_PPDs_install == manufacturer_PPDs_installed
+ && filters_install == filters_installed
+ && "" == filterchars( ppd_path_input_value, Printer::alnum_chars )
+ )
+ { // Nothing changed. Exit this dialog:
+ break;
+ }
+ Wizard::DisableBackButton();
+ Wizard::DisableAbortButton();
+ Wizard::DisableNextButton();
+ // The following steps might be optimized because currently
+ // the package manager is called anew for each individual package
+ // so that for each package which is installed SuSEconfig is run.
+ // On the other hand this way the user can confirm or reject
+ // for each individual package which is to be installed
+ // whether or not is should really be installed and
+ // for each individual package which is to be removed
+ // whether or not is should really be removed.
+ // Because of this and because I assume that usually the user
+ // does not install or remove several packages at once
+ // and because the maximum amount is only 5 packages,
+ // I prefer currently to run the package manager
+ // well separated for each individual package.
+ boolean package_changed = false;
+ if( cups_drivers_install != cups_drivers_installed )
+ { if( cups_drivers_install )
+ { if( Printerlib::TestAndInstallPackage( "cups-drivers", "install" ) )
+ { package_changed = true;
+ }
+ }
+ else
+ { if( Printerlib::TestAndInstallPackage( "cups-drivers", "remove" ) )
+ { package_changed = true;
+ }
+ }
+ }
+ if( gutenprint_install != gutenprint_installed )
+ { if( gutenprint_install )
+ { if( Printerlib::TestAndInstallPackage( "gutenprint", "install" ) )
+ { package_changed = true;
+ }
+ }
+ else
+ { if( Printerlib::TestAndInstallPackage( "gutenprint", "remove" ) )
+ { package_changed = true;
+ }
+ }
+ }
+ if( hplip_install != hplip_installed )
+ { if( hplip_install )
+ { if( Printerlib::TestAndInstallPackage( "hplip", "install" ) )
+ { package_changed = true;
+ }
+ }
+ else
+ { if( Printerlib::TestAndInstallPackage( "hplip", "remove" ) )
+ { package_changed = true;
+ }
+ }
+ }
+ if( manufacturer_PPDs_install != manufacturer_PPDs_installed )
+ { if( manufacturer_PPDs_install )
+ { if( Printerlib::TestAndInstallPackage( "manufacturer-PPDs", "install" ) )
+ { package_changed = true;
+ }
+ }
+ else
+ { if( Printerlib::TestAndInstallPackage( "manufacturer-PPDs", "remove" ) )
+ { package_changed = true;
+ }
+ }
+ }
+ if( filters_install != filters_installed )
+ { if( filters_install )
+ { if( Printerlib::TestAndInstallPackage( "filters", "install" ) )
+ { package_changed = true;
+ }
+ }
+ else
+ { if( Printerlib::TestAndInstallPackage( "filters", "remove" ) )
+ { package_changed = true;
+ }
+ }
+ }
+ // If driver packages were actually changed (the user may have rejected it),
+ // enforce that the BasicAddDialog and/or the BasicModifyDialog
+ // (only form those dialogs this AddDriverDialog can be called)
+ // do re-retrieve the driver information anew from the system.
+ // Both the BasicAddDialog and the BasicModifyDialog call Printer::DriverItems
+ // and this calls Printer::CreateDatabase when the ppds list is empty.
+ // It would not be more failsafe not to clear the ppds list here
+ // because Printer::CreateDatabase overwrites it in any case.
+ if( package_changed )
+ { Printer::ppds = [];
+ }
+ // Ignore an effectively empty ppd_path_input_value:
+ if( "" != filterchars( ppd_path_input_value, Printer::alnum_chars ) )
+ { if( ! Printerlib::ExecuteBashCommand( "ls -l '" + ppd_path_input_value + "'" ) )
+ { Popup::ErrorDetails( sformat( // Popup::ErrorDetails message
+ // where %1 will be replaced by the file name:
+ _("Cannot access '%1'"),
+ ppd_path_input_value
+ ),
+ Printerlib::result["stderr"]:""
+ );
+ // Simply exit this dialog because it does not make sense to proceed here
+ // and there is nothing else to be done after this:
+ break;
+ }
+ if( ! Printerlib::ExecuteBashCommand( "cupstestppd -W constraints -W defaults -W translations -r -v '" + ppd_path_input_value + "'" ) )
+ { Popup::ErrorDetails( // Popup::ErrorDetails message:
+ _("The printer description file is not in compliance to the specification."),
+ // The cupstestppd report is on stdout:
+ Printerlib::result["stdout"]:""
+ );
+ if( ! Popup::ContinueCancelHeadline( // Header of a Popup::ContinueCancelHeadline
+ // when a PPD file is not in compliance:
+ _("Use the printer description file regardless of its errors?"),
+ // Body of a Popup::ContinueCancelHeadline
+ // when PPD file is not in compliance:
+ _("A non-compliant printer description file can lead to any printing failure.")
+ )
+ )
+ { // The user has decided not to continue:
+ break;
+ }
+ }
+ if( ! Printerlib::ExecuteBashCommand( "test -d /usr/share/cups/model/downloaded || mkdir /usr/share/cups/model/downloaded ; cp '" + ppd_path_input_value + "' /usr/share/cups/model/downloaded" ) )
+ { Popup::ErrorDetails( // Popup::ErrorDetails message:
+ _("Failed to add the printer description file"),
+ Printerlib::result["stderr"]:""
+ );
+ // Simply exit this dialog because it does not make sense to proceed here
+ // and there is nothing else to be done after this:
+ break;
+ }
+ // If a ppd was actually installed in /usr/share/cups/model/downloaded
+ // enforce that the BasicAddDialog and/or the BasicModifyDialog
+ // re-retrieve the driver information anew from the system (see above):
+ Printer::ppds = [];
+ }
+ // Exit this dialog in any case:
+ break;
+ }
+ y2milestone( "Ignoring unexpected returncode in AddDriverDialog: %1", ret );
+ continue;
+ }
+ Wizard::EnableBackButton();
+ Wizard::EnableAbortButton();
+ Wizard::EnableNextButton();
+ return ret;
+}
+
+/* EOF */
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.25/src/driveroptions.ycp new/yast2-printer-2.17.26/src/driveroptions.ycp
--- old/yast2-printer-2.17.25/src/driveroptions.ycp 2008-10-23 07:53:54.000000000 +0200
+++ new/yast2-printer-2.17.26/src/driveroptions.ycp 2008-10-23 11:38:46.000000000 +0200
@@ -45,7 +45,9 @@
*/
any DriverOptionsDialog()
{ string name = Printer::queues[Printer::selected_queues_index,"name"]:"";
- string caption = _("Driver Options for Queue") + " " + name;
+ // Title of the Driver Options Dialog where %1 will be replaced by the queue name.
+ // The actual queue name is a system value which cannot be translated:
+ string caption = sformat( _("Driver Options for Queue %1") , name );
term contents = `Tree( `id(`driver_options_tree),
// The `notify option makes UI::UserInput() return immediately
// as soon as the user selects a tree item rather than the default behaviour
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.25/src/helps.ycp new/yast2-printer-2.17.26/src/helps.ycp
--- old/yast2-printer-2.17.25/src/helps.ycp 2008-10-23 07:53:54.000000000 +0200
+++ new/yast2-printer-2.17.26/src/helps.ycp 2008-10-23 15:15:14.000000000 +0200
@@ -242,6 +242,46 @@
otherwise the driver may ignore duplex printing option settings.
</p>"),
+"add_driver_dialog" :
+// AddDriverDialog help 1/2:
+_("<p>
+<b><big>Add or Remove Printer Driver Packages</big></b><br>
+When a printer driver package is not marked, it is not installed
+and then you can select it so that it will be installed.<br>
+When a printer driver package is marked, it is installed
+and then you can un-select it so that it will be removed.
+In the latter case it is up to you to make sure
+that there is no printer configuration which needs the driver.<br>
+</p>") +
+// AddDriverDialog help 2/2:
+_("<p>
+<b><big>Add a Printer Description File</big></b><br>
+To set up a printer configuration a printer description file
+(PPD file) is required.<br>
+When a PPD file is not located in the /usr/share/cups/model/ directory,
+it is not available to set up a printer configuration with it.
+Therefore you can specify the full path of a PPD file
+which is located elsewhere on your system to get it installed
+in the /usr/share/cups/model/ directory.<br>
+Note that a printer description file file is not a driver.<br>
+For non-PostScript printers the PPD file alone is
+not sufficient to set up a working printer configuration.
+In particular it does not work for non-PostScript printers
+to download a PPD file from the Internet and then set up
+the printer with such a PPD file.
+The plain printer setup would work but actual printing
+would not work because the driver is missing.
+For non-PostScript printers you need a printer driver
+and a PPD file which matches exactly to the particular driver.
+Matching PPD files are automatically installed at the right place
+when you install the above mentioned printer driver packages.<br>
+Only for PostScript printers, a PPD file alone is usually
+sufficient to set up a working PostScript printer configuration.
+In particular it is sufficient when the PPD file does not
+contain a 'cupsFilter' entry because such an entry would
+reference a printer driver.<br>
+</p>"),
+
"connection_wizard_dialog" :
// ConnectionWizardDialog help 1/6:
_("<p>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.25/src/Makefile.am new/yast2-printer-2.17.26/src/Makefile.am
--- old/yast2-printer-2.17.25/src/Makefile.am 2008-10-23 07:53:54.000000000 +0200
+++ new/yast2-printer-2.17.26/src/Makefile.am 2008-10-23 11:17:04.000000000 +0200
@@ -16,6 +16,7 @@
basicmodify.ycp \
connectionwizard.ycp \
driveroptions.ycp \
+ driveradd.ycp \
printingvianetwork.ycp \
sharing.ycp \
policies.ycp \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.25/src/Makefile.in new/yast2-printer-2.17.26/src/Makefile.in
--- old/yast2-printer-2.17.25/src/Makefile.in 2008-10-23 10:51:38.000000000 +0200
+++ new/yast2-printer-2.17.26/src/Makefile.in 2008-10-23 17:28:05.000000000 +0200
@@ -196,6 +196,7 @@
basicmodify.ycp \
connectionwizard.ycp \
driveroptions.ycp \
+ driveradd.ycp \
printingvianetwork.ycp \
sharing.ycp \
policies.ycp \
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.25/src/Printerlib.ycp new/yast2-printer-2.17.26/src/Printerlib.ycp
--- old/yast2-printer-2.17.25/src/Printerlib.ycp 2008-10-23 07:53:54.000000000 +0200
+++ new/yast2-printer-2.17.26/src/Printerlib.ycp 2008-10-23 14:36:00.000000000 +0200
@@ -77,49 +77,77 @@
}
/**
- * Test whether the package is installed (Package::Installed) and
- * if not then test whether the package is available to be installed (Package::Available) and
- * if yes then install it (Package::Install).
+ * Test whether the package is installed (Package::Installed) or
+ * test whether the package is available to be installed (Package::Available)
+ * and if yes then install it (Package::Install) if it is not yet installed or
+ * remove the package (Package::Remove) if it is installed.
* @param package_name string of the package name
+ * @param package_name string of the action to be done (installed or install or remove).
* @return true on success
*/
-global boolean TestAndInstallPackage( string package_name )
-{ if( Package::Installed( package_name ) )
- { return true;
- }
- // Is the package available to be installed?
- // Package::Available returns nil if no package source is available.
- boolean package_available = Package::Available( package_name );
- if( nil == package_available )
- { y2milestone( "Required package %1 is not installed and there is no package repository available.", package_name );
- Popup::Error( sformat( // Message of a Popup::Error where %1 will be replaced by the package name:
- _("Required package %1 is not installed and there is no package repository available."),
- package_name
- )
- );
- return false;
+global boolean TestAndInstallPackage( string package_name, string action )
+{ y2milestone( "TestAndInstallPackage '%1' with action '%2'", package_name, action );
+ if( "installed" == action )
+ { if( ! Package::Installed( package_name ) )
+ { return false;
+ }
}
- if( ! package_available )
- { y2milestone( "Required package %1 is not installed and not available in the repository.", package_name );
- Popup::Error( sformat( // Message of a Popup::Error where %1 will be replaced by the package name:
- _("Required package %1 is not installed and not available in the repository."),
- package_name
- )
- );
- return false;
+ if( "install" == action )
+ { if( Package::Installed( package_name ) )
+ { return true;
+ }
+ // Is the package available to be installed?
+ // Package::Available returns nil if no package source is available.
+ boolean package_available = Package::Available( package_name );
+ if( nil == package_available )
+ { y2milestone( "Required package %1 is not installed and there is no package repository available.", package_name );
+ Popup::Error( sformat( // Message of a Popup::Error where %1 will be replaced by the package name:
+ _("Required package %1 is not installed and there is no package repository available."),
+ package_name
+ )
+ );
+ return false;
+ }
+ if( ! package_available )
+ { y2milestone( "Required package %1 is not installed and not available in the repository.", package_name );
+ Popup::Error( sformat( // Message of a Popup::Error where %1 will be replaced by the package name:
+ _("Required package %1 is not installed and not available in the repository."),
+ package_name
+ )
+ );
+ return false;
+ }
+ if( ! Package::Install( package_name ) )
+ { y2milestone( "Failed to install required package %1.", package_name );
+ Popup::Error( // Message of a Popup::Error where %1 will be replaced by the package name.
+ // Only a simple message because:
+ // Either the user has explicitely rejected to install the package,
+ // or this error does not happen on a normal system
+ // (i.e. a system which is not totally broken or totally messed up).
+ sformat( _("Failed to install required package %1."),
+ package_name
+ )
+ );
+ return false;
+ }
}
- if( ! Package::Install( package_name ) )
- { y2milestone( "Failed to install required package %1.", package_name );
- Popup::Error( // Message of a Popup::Error where %1 will be replaced by the package name.
- // Only a simple message because:
- // Either the user has explicitely rejected to install the package,
- // or this error does not happen on a normal system
- // (i.e. a system which is not totally broken or totally messed up).
- sformat( _("Failed to install required package %1."),
+ if( "remove" == action )
+ { if( ! Package::Installed( package_name ) )
+ { return true;
+ }
+ if( ! Package::Remove( package_name ) )
+ { y2milestone( "Failed to remove package %1.", package_name );
+ Popup::Error( // Message of a Popup::Error where %1 will be replaced by the package name.
+ // Only a simple message because:
+ // Either the user has explicitely rejected to remove the package,
+ // or this error does not happen on a normal system
+ // (i.e. a system which is not totally broken or totally messed up).
+ sformat( _("Failed to remove package %1."),
package_name
- )
- );
- return false;
+ )
+ );
+ return false;
+ }
}
return true;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.25/src/Printer.ycp new/yast2-printer-2.17.26/src/Printer.ycp
--- old/yast2-printer-2.17.25/src/Printer.ycp 2008-10-23 07:53:54.000000000 +0200
+++ new/yast2-printer-2.17.26/src/Printer.ycp 2008-10-23 14:21:37.000000000 +0200
@@ -255,7 +255,7 @@
* @return true on success
*/
boolean CreateDatabase()
-{ // Show feedback because creating the printer driver database takes a few seconds:
+{ // Show feedback because creating the printer driver database takes several seconds:
boolean progress_feedback = UI::HasSpecialWidget( `DownloadProgress );
if( progress_feedback )
{ // Show nice self-updating feedback:
@@ -316,7 +316,7 @@
return false;
}
ppds = (list< map< string, string > >)SCR::Read( .target.ycp, database_filename );
- if( nil == connections )
+ if( nil == ppds )
{ if( progress_feedback )
{ UI::CloseDialog();
}
@@ -621,7 +621,7 @@
// The cups-client RPM is the minimum requirement
// for accessing remote CUPS servers via a "client-only" config.
// Therefore abort (return false) if cups-client is not installed:
- if( ! Printerlib::TestAndInstallPackage( "cups-client" ) )
+ if( ! Printerlib::TestAndInstallPackage( "cups-client", "install" ) )
{ return false;
}
// The cups RPM ist the default requirement
@@ -629,7 +629,7 @@
// and it is the minimum requirement for local print queues.
// Therefore try to install cups but because for a "client-only" config
// only cups-client is required, proceed even if cups is not installed:
- Printerlib::TestAndInstallPackage( "cups" );
+ Printerlib::TestAndInstallPackage( "cups", "install" );
// Only in the second stage of the system installation make sure that a local cupsd is running
// because it is needed for automated queue setup during system installation
// see https://bugzilla.novell.com/show_bug.cgi?id=418585
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.25/src/wizards.ycp new/yast2-printer-2.17.26/src/wizards.ycp
--- old/yast2-printer-2.17.25/src/wizards.ycp 2008-10-23 07:53:54.000000000 +0200
+++ new/yast2-printer-2.17.26/src/wizards.ycp 2008-10-23 11:28:15.000000000 +0200
@@ -41,6 +41,7 @@
include "printer/connectionwizard.ycp";
include "printer/printingvianetwork.ycp";
include "printer/driveroptions.ycp";
+include "printer/driveradd.ycp";
include "printer/dialogs.ycp";
/**
@@ -51,8 +52,10 @@
{ map aliases = $[ "overview" : ``( runMainDialog() ),
"add" : ``( BasicAddDialog() ),
"add_connection_wizard" : ``( ConnectionWizardDialog() ),
+ "add_driver_add" : ``( AddDriverDialog() ),
"modify" : ``( BasicModifyDialog() ),
"modify_connection_wizard" : ``( ConnectionWizardDialog() ),
+ "modify_driver_add" : ``( AddDriverDialog() ),
"modify_driver_options" : ``( DriverOptionsDialog() ),
"printing_via_network_connection_wizard" : ``( ConnectionWizardDialog() )
];
@@ -66,19 +69,27 @@
],
"add" : $[ `abort : `abort,
`next : "overview",
- `connection_wizard : "add_connection_wizard"
+ `connection_wizard : "add_connection_wizard",
+ `add_driver : "add_driver_add"
],
"add_connection_wizard" : $[ `abort : `abort,
`next : "add"
],
+ "add_driver_add" : $[ `abort : `abort,
+ `next : "add"
+ ],
"modify" : $[ `abort : `abort,
`next : "overview",
`connection_wizard : "modify_connection_wizard",
+ `add_driver : "modify_driver_add",
`driver_options : "modify_driver_options"
],
"modify_connection_wizard" : $[ `abort : `abort,
`next : "modify"
],
+ "modify_driver_add" : $[ `abort : `abort,
+ `next : "modify"
+ ],
"modify_driver_options" : $[ `abort : `abort,
`next : "modify"
],
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.25/VERSION new/yast2-printer-2.17.26/VERSION
--- old/yast2-printer-2.17.25/VERSION 2008-10-23 10:46:06.000000000 +0200
+++ new/yast2-printer-2.17.26/VERSION 2008-10-23 17:26:38.000000000 +0200
@@ -1 +1 @@
-2.17.25
+2.17.26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org