Hello community,
here is the log from the commit of package yast2-printer for openSUSE:Factory
checked in at Fri Feb 27 16:50:43 CET 2009.
--------
--- yast2-printer/yast2-printer.changes 2009-02-26 15:28:38.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-printer/yast2-printer.changes 2009-02-27 15:46:09.301957000 +0100
@@ -1,0 +2,8 @@
+Fri Feb 27 15:35:16 CET 2009 - jsmeix@suse.de
+
+- Added the functionality to basicadd.ycp and basicmodify.ycp to
+ set the default paper size directly when a driver is assigned
+ or when the currently used driver is replaced by another one.
+- 2.18.8
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
yast2-printer-2.18.7.tar.bz2
New:
----
yast2-printer-2.18.8.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-printer.spec ++++++
--- /var/tmp/diff_new_pack.S24644/_old 2009-02-27 16:49:32.000000000 +0100
+++ /var/tmp/diff_new_pack.S24644/_new 2009-02-27 16:49:32.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-printer (Version 2.18.7)
+# spec file for package yast2-printer (Version 2.18.8)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -20,12 +20,12 @@
Url: http://en.opensuse.org/YaST/Modules/Printer
Name: yast2-printer
-Version: 2.18.7
+Version: 2.18.8
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-printer-2.18.7.tar.bz2
+Source0: yast2-printer-2.18.8.tar.bz2
Prefix: /usr
BuildRequires: cups-devel update-desktop-files yast2 yast2-core-devel yast2-devtools yast2-testsuite
Recommends: netcat
@@ -65,7 +65,7 @@
Michal Zugec
%prep
-%setup -n yast2-printer-2.18.7
+%setup -n yast2-printer-2.18.8
%build
%{prefix}/bin/y2tool y2autoconf
@@ -127,6 +127,11 @@
%exclude %{prefix}/share/doc/packages/yast2-printer/COPYING
%exclude %{prefix}/share/doc/packages/yast2-printer/README
%changelog
+* Fri Feb 27 2009 jsmeix@suse.de
+- Added the functionality to basicadd.ycp and basicmodify.ycp to
+ set the default paper size directly when a driver is assigned
+ or when the currently used driver is replaced by another one.
+- 2.18.8
* Thu Feb 26 2009 jsmeix@suse.de
- Fixed the "More Drivers" functionality in basicmodify.ycp
to show the current driver topmost in any case.
++++++ yast2-printer-2.18.7.tar.bz2 -> yast2-printer-2.18.8.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.18.7/configure new/yast2-printer-2.18.8/configure
--- old/yast2-printer-2.18.7/configure 2009-02-26 15:22:24.000000000 +0100
+++ new/yast2-printer-2.18.8/configure 2009-02-27 15:38:44.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for yast2-printer 2.18.7.
+# Generated by GNU Autoconf 2.63 for yast2-printer 2.18.8.
#
# Report bugs to http://bugs.opensuse.org/.
#
@@ -596,8 +596,8 @@
# Identity of this package.
PACKAGE_NAME='yast2-printer'
PACKAGE_TARNAME='yast2-printer'
-PACKAGE_VERSION='2.18.7'
-PACKAGE_STRING='yast2-printer 2.18.7'
+PACKAGE_VERSION='2.18.8'
+PACKAGE_STRING='yast2-printer 2.18.8'
PACKAGE_BUGREPORT='http://bugs.opensuse.org/'
ac_unique_file="RPMNAME"
@@ -1274,7 +1274,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.18.7 to adapt to many kinds of systems.
+\`configure' configures yast2-printer 2.18.8 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1345,7 +1345,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of yast2-printer 2.18.7:";;
+ short | recursive ) echo "Configuration of yast2-printer 2.18.8:";;
esac
cat <<\_ACEOF
@@ -1425,7 +1425,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-yast2-printer configure 2.18.7
+yast2-printer configure 2.18.8
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1439,7 +1439,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.18.7, which was
+It was created by yast2-printer $as_me 2.18.8, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2286,7 +2286,7 @@
# Define the identity of the package.
PACKAGE='yast2-printer'
- VERSION='2.18.7'
+ VERSION='2.18.8'
cat >>confdefs.h <<_ACEOF
@@ -2510,7 +2510,7 @@
-VERSION="2.18.7"
+VERSION="2.18.8"
RPMNAME="yast2-printer"
MAINTAINER="Michal Zugec "
@@ -3451,7 +3451,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.18.7, which was
+This file was extended by yast2-printer $as_me 2.18.8, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3501,7 +3501,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-yast2-printer config.status 2.18.7
+yast2-printer config.status 2.18.8
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.18.7/configure.in new/yast2-printer-2.18.8/configure.in
--- old/yast2-printer-2.18.7/configure.in 2009-02-26 15:22:19.000000000 +0100
+++ new/yast2-printer-2.18.8/configure.in 2009-02-27 15:38:40.000000000 +0100
@@ -3,7 +3,7 @@
dnl -- This file is generated by y2autoconf 2.17.6 - DO NOT EDIT! --
dnl (edit configure.in.in instead)
-AC_INIT(yast2-printer, 2.18.7, http://bugs.opensuse.org/, yast2-printer)
+AC_INIT(yast2-printer, 2.18.8, 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.18.7"
+VERSION="2.18.8"
RPMNAME="yast2-printer"
MAINTAINER="Michal Zugec "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.18.7/src/basicmodify.ycp new/yast2-printer-2.18.8/src/basicmodify.ycp
--- old/yast2-printer-2.18.7/src/basicmodify.ycp 2009-02-26 14:11:07.000000000 +0100
+++ new/yast2-printer-2.18.8/src/basicmodify.ycp 2009-02-27 15:27:37.000000000 +0100
@@ -218,6 +218,29 @@
}
}
}
+ // If the currently used driver is replaced by another driver,
+ // show the same content as in the BasicAddDialog to set the default paper size:
+ term new_driver_paper_choice_content = `RadioButtonGroup
+ ( `id(`paper_size_radio_buttons),
+ `HBox
+ ( `Label
+ ( // Label of a RadioButtonGroup to specify the default paper size:
+ _("Default paper size (if printer and driver supports it)")
+ ),
+ // Have none of the RadioButtons preselected which means that
+ // by default the CUPS default is used for the default paper size.
+ // For the CUPS 1.3 default see http://www.cups.org/str.php?L2846
+ // For CUPS 1.4 the default depends on the "DefaultPaperSize"
+ // setting in cupsd.conf
+ // see https://bugzilla.novell.com/show_bug.cgi?id=395760
+ // and http://www.cups.org/str.php?L2848
+ `HSpacing( 2 ),
+ `RadioButton( `id(`a4), "A&4" ),
+ `HSpacing( 1 ),
+ `RadioButton( `id(`letter), "Le&tter" ),
+ `HStretch()
+ )
+ );
// Usually the id in the connection items is the matching index number in the connections list.
// Here the id of the current connection is set to -1 because the uri of the current connection
// is derived from the queues list and this uri may be not present in the connections list
@@ -437,6 +460,7 @@
if( ret == `next )
{ commandline = "/usr/sbin/lpadmin -h localhost -p '" + name + "'";
boolean something_has_changed = false;
+ boolean set_paper_size_later = false;
integer selected_connection_index = (integer)UI::QueryWidget( `id(`connection_selection), `CurrentItem );
if( selected_connection_index >= 0 )
{ uri = Printer::connections[selected_connection_index,"uri"]:"";
@@ -451,10 +475,13 @@
if( "" != ppd )
{ commandline = commandline + " -m '" + ppd + "'";
something_has_changed = true;
+ // The paper size for a new driver will be only set
+ // after the new driver was actually successfully set:
+ set_paper_size_later = true;
}
}
- if( -1 == selected_ppd_index )
- { // The default paper size can be only set for the currently used driver.
+ else
+ { // The default paper size is only set in the same command for the currently used driver.
// Depending on the currently used driver no paper size selection might exists
// in particular not for a 'raw' queue or when a 'System V style interface script' is used:
if( UI::WidgetExists( `id(`paper_size_radio_buttons) ) )
@@ -540,6 +567,44 @@
Printerlib::result["stderr"]:""
);
}
+ else
+ { // Set the default paper size for a new driver only
+ // after a new driver was actually successfully set.
+ if( set_paper_size_later )
+ { // Depending on the previously used driver no paper size selection might exists
+ // in particular not for a 'raw' queue or when a 'System V style interface script' is used.
+ // When a driver is set for a 'raw' queue or for a queue with a 'System V style interface script',
+ // it is therefore not possible to set the default paper size for the new driver now
+ // so that the user would have to run the modify dialog again to do this.
+ if( UI::WidgetExists( `id(`paper_size_radio_buttons) ) )
+ { default_paper_size = "";
+ any paper_size = UI::QueryWidget( `id(`paper_size_radio_buttons), `CurrentButton );
+ if( `a4 == paper_size )
+ { default_paper_size = "A4";
+ }
+ if( `letter == paper_size )
+ { default_paper_size = "Letter";
+ }
+ // Try to set the requested default_paper_size if it is an available choice for this queue.
+ // If no default_paper_size is requested, the CUPS default is used.
+ // For the CUPS 1.3 default see http://www.cups.org/str.php?L2846
+ // For CUPS 1.4 the default depends on the "DefaultPaperSize" setting in cupsd.conf
+ // see https://bugzilla.novell.com/show_bug.cgi?id=395760
+ // and http://www.cups.org/str.php?L2848
+ if( "" != default_paper_size )
+ { // '\>' is used to find an available choice also when it is the last value on the line.
+ // Note the YCP quoting: \\< becomes \< and \\> becomes \> in the commandline.
+ commandline = "lpoptions -h localhost -p '" + name + "' -l | grep '^PageSize.*\\<" + default_paper_size + "\\>'";
+ if( Printerlib::ExecuteBashCommand( commandline ) )
+ { commandline = "/usr/sbin/lpadmin -h localhost -p '" + name + "' -o 'PageSize=" + default_paper_size + "'";
+ // Do not care if it fails to set the default_paper_size (i.e. show no error message to the user)
+ // because the default_paper_size setting is nice to have but not mandatoty for a working queue:
+ Printerlib::ExecuteBashCommand( commandline );
+ }
+ }
+ }
+ }
+ }
Wizard::EnableBackButton();
Wizard::EnableNextButton();
}
@@ -791,7 +856,10 @@
{ // When the currently used driver is to be exchanged,
// the widgets to change options for the currently used driver are removed and
// the description_input field is overwritten with the NickName of the new selected driver:
- UI::ReplaceWidget( `id(`paper_choice_and_driver_options_replace_point), `Empty() );
+ //UI::ReplaceWidget( `id(`paper_choice_and_driver_options_replace_point), `Empty() );
+ UI::ReplaceWidget( `id(`paper_choice_and_driver_options_replace_point),
+ `Left( new_driver_paper_choice_content )
+ );
string new_description = Printer::ppds[selected_ppd_index,"nickname"]:"";
if( "" != model
&& "unknown" != tolower( model )
@@ -851,23 +919,23 @@
{ driver_filter_string = "";
boolean valid_driver_found = false;
list driver_items = [];
- // Use the existing value of model because for each subsequent run of this more_drivers section
- // the existing value of model is shortened at the end (the last word is removed) to get
- // more and mor derivers for each subsequent run of this more_drivers section.
- y2milestone( "More drivers for '%1'", model );
- if( "" != model
- && "unknown" != tolower( model )
+ // Use the existing value of driver_filter_input_text
+ // which is usually set to nick_name and to model as fallback.
+ driver_filter_input_text = (string)UI::QueryWidget( `id(`driver_filter_input), `Value );
+ y2milestone( "More drivers for '%1'", driver_filter_input_text );
+ if( "" != driver_filter_input_text
+ && "unknown" != tolower( driver_filter_input_text )
)
- { // If the model string does not contain a space,
- // model_words is a singleton list which contains only model.
- list <string> model_words = splitstring( model, " " );
- if( size( model_words ) >= 2 )
+ { // If the driver_filter_input_text string does not contain a space,
+ // words is a singleton list which contains only one word.
+ list <string> words = splitstring( driver_filter_input_text, " " );
+ if( size( words ) >= 2 )
{ // If there are less than two words the following does not make sense.
// Try to find the word which contains a model number.
// This is usually the first word which contains a number.
string model_number_word = "";
foreach( string word,
- model_words,
+ words,
{ if( "" != filterchars( word, Printer::number_chars ) )
{ model_number_word = word;
break;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.18.7/VERSION new/yast2-printer-2.18.8/VERSION
--- old/yast2-printer-2.18.7/VERSION 2009-02-26 14:49:01.000000000 +0100
+++ new/yast2-printer-2.18.8/VERSION 2009-02-27 15:35:14.000000000 +0100
@@ -1 +1 @@
-2.18.7
+2.18.8
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org