Hello community,
here is the log from the commit of package yast2-printer
checked in at Fri Sep 26 15:16:47 CEST 2008.
--------
--- yast2-printer/yast2-printer.changes 2008-09-25 17:58:14.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-printer/yast2-printer.changes 2008-09-26 12:59:54.215779000 +0200
@@ -1,0 +2,11 @@
+Fri Sep 26 12:34:22 CEST 2008 - jsmeix@suse.de
+
+- In the "Share Printers" dialog it is now no longer possible
+ to "Add" the same network interface several times
+ (even with different settings for "publishing").
+- Using Popup::ErrorDetails wherever possible to provide
+ the actual system stderr message via [Details]
+ (see Novell/Suse Bugzilla bnc#429397).
+- 2.17.17
+
+-------------------------------------------------------------------
Old:
----
yast2-printer-2.17.16.tar.bz2
New:
----
yast2-printer-2.17.17.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-printer.spec ++++++
--- /var/tmp/diff_new_pack.LW8321/_old 2008-09-26 15:16:11.000000000 +0200
+++ /var/tmp/diff_new_pack.LW8321/_new 2008-09-26 15:16:11.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-printer (Version 2.17.16)
+# spec file for package yast2-printer (Version 2.17.17)
#
# 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.16
+Version: 2.17.17
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-printer-2.17.16.tar.bz2
+Source0: yast2-printer-2.17.17.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.16
+%setup -n yast2-printer-2.17.17
%build
%{prefix}/bin/y2tool y2autoconf
@@ -119,6 +119,14 @@
%exclude %{prefix}/share/doc/packages/yast2-printer/COPYING
%exclude %{prefix}/share/doc/packages/yast2-printer/README
%changelog
+* Fri Sep 26 2008 jsmeix@suse.de
+- In the "Share Printers" dialog it is now no longer possible
+ to "Add" the same network interface several times
+ (even with different settings for "publishing").
+- Using Popup::ErrorDetails wherever possible to provide
+ the actual system stderr message via [Details]
+ (see Novell/Suse Bugzilla bnc#429397).
+- 2.17.17
* Thu Sep 25 2008 jsmeix@suse.de
- First usable version of the "Share Printers" dialog.
Curently it is not yet implemented to share via
++++++ yast2-printer-2.17.16.tar.bz2 -> yast2-printer-2.17.17.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.16/configure new/yast2-printer-2.17.17/configure
--- old/yast2-printer-2.17.16/configure 2008-09-25 17:50:47.000000000 +0200
+++ new/yast2-printer-2.17.17/configure 2008-09-26 12:55:31.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.16.
+# Generated by GNU Autoconf 2.61 for yast2-printer 2.17.17.
#
# 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.16'
-PACKAGE_STRING='yast2-printer 2.17.16'
+PACKAGE_VERSION='2.17.17'
+PACKAGE_STRING='yast2-printer 2.17.17'
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.16 to adapt to many kinds of systems.
+\`configure' configures yast2-printer 2.17.17 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.16:";;
+ short | recursive ) echo "Configuration of yast2-printer 2.17.17:";;
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.16
+yast2-printer configure 2.17.17
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.16, which was
+It was created by yast2-printer $as_me 2.17.17, 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.16'
+ VERSION='2.17.17'
cat >>confdefs.h <<_ACEOF
@@ -2409,7 +2409,7 @@
-VERSION="2.17.16"
+VERSION="2.17.17"
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.16, which was
+This file was extended by yast2-printer $as_me 2.17.17, 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.16
+yast2-printer config.status 2.17.17
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.16/configure.in new/yast2-printer-2.17.17/configure.in
--- old/yast2-printer-2.17.16/configure.in 2008-09-25 17:50:43.000000000 +0200
+++ new/yast2-printer-2.17.17/configure.in 2008-09-26 12:55:27.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.16, http://bugs.opensuse.org/, yast2-printer)
+AC_INIT(yast2-printer, 2.17.17, 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.16"
+VERSION="2.17.17"
RPMNAME="yast2-printer"
MAINTAINER="Michal Zugec "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.16/src/basicadd.ycp new/yast2-printer-2.17.17/src/basicadd.ycp
--- old/yast2-printer-2.17.16/src/basicadd.ycp 2008-09-24 17:20:29.000000000 +0200
+++ new/yast2-printer-2.17.17/src/basicadd.ycp 2008-09-26 12:28:04.000000000 +0200
@@ -340,6 +340,13 @@
driver_filter_string = "^" + driver_filter_string;
}
}
+ if( "" == driver_filter_string )
+ { // Set a fallback driver_filter_string to avoid that the full list
+ // of thousands of PPDs is shown automatically because
+ // it can take a very long time until the user can proceed:
+ driver_filter_input_text = "Generic";
+ driver_filter_string = "^generic";
+ }
UI::ReplaceWidget( `id(`driver_filter_input_replace_point),
`TextEntry( `id(`driver_filter_input),
// Caption for a printer driver selection:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.16/src/basicmodify.ycp new/yast2-printer-2.17.17/src/basicmodify.ycp
--- old/yast2-printer-2.17.16/src/basicmodify.ycp 2008-09-24 17:20:29.000000000 +0200
+++ new/yast2-printer-2.17.17/src/basicmodify.ycp 2008-09-26 12:27:37.000000000 +0200
@@ -663,6 +663,13 @@
driver_filter_string = filterchars( tolower( model ), Printer::lower_alnum_chars );
}
}
+ if( "" == driver_filter_string )
+ { // Set a fallback driver_filter_string to avoid that the full list
+ // of thousands of PPDs is shown automatically because
+ // it can take a very long time until the user can proceed:
+ driver_filter_input_text = "Generic";
+ driver_filter_string = "^generic";
+ }
UI::ReplaceWidget( `id(`driver_filter_input_replace_point),
`TextEntry( `id(`driver_filter_input),
// Caption for a printer driver selection:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.16/src/overview.ycp new/yast2-printer-2.17.17/src/overview.ycp
--- old/yast2-printer-2.17.16/src/overview.ycp 2008-09-24 17:20:29.000000000 +0200
+++ new/yast2-printer-2.17.17/src/overview.ycp 2008-09-26 12:09:30.000000000 +0200
@@ -33,7 +33,6 @@
import "Label";
import "Popup";
-import "Report";
import "Wizard";
import "Wizard_hw";
import "Confirm";
@@ -348,10 +347,11 @@
}
// Remove the 'ServerName' entry in /etc/cups/client.conf:
if( ! Printerlib::ExecuteBashCommand( Printerlib::yast_bin_dir + "cups_client_only none" ) )
- { Report::Error( // Message of a Report::Error.
- // Only a simple message because this error does not happen on a normal system
- // (i.e. a system which is not totally broken or totally messed up).
- _("Failed to remove the 'ServerName' entry in /etc/cups/client.conf")
+ { Popup::ErrorDetails( // Popup::ErrorDetails message.
+ // Only a simple message because this error does not happen on a normal system
+ // (i.e. a system which is not totally broken or totally messed up).
+ _("Failed to remove the 'ServerName' entry in /etc/cups/client.conf"),
+ Printerlib::result["stderr"]:""
);
return nil;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.16/src/Printerlib.ycp new/yast2-printer-2.17.17/src/Printerlib.ycp
--- old/yast2-printer-2.17.16/src/Printerlib.ycp 2008-09-24 17:20:29.000000000 +0200
+++ new/yast2-printer-2.17.17/src/Printerlib.ycp 2008-09-26 10:25:11.000000000 +0200
@@ -108,19 +108,30 @@
);
return false;
}
- // Wait one minute for a new started cupsd is necessary because
+ // Sleep one second in any case so that the new started cupsd can become ready to operate:
+ sleep( 1000 );
+ // Wait half a minute for a new started cupsd is necessary because
// when a client-only config is switched to a "get Browsing info" config
// the BrowseInterval in cupsd.conf on remote CUPS servers is by default 30 seconds
// so that the local cupsd should listen at least 31 seconds to get Browsing info
// before e.g. the Overview dialog can be shown with the right current queues.
- // Additionally during first start after system installation the cupsd parses
- // all the (usually thousands) of installed PPDs to generate
- // the list of available drivers (what "lpinfo -l -m" shows).
- Popup::TimedMessage( _("Started the CUPS daemon.\nWaiting one minute so that it is ready to operate..."),
- 60
+ Popup::TimedMessage( _("Started the CUPS daemon.\nWaiting half a minute so that it is ready to operate..."),
+ 30
);
local_cupsd_accessible = ExecuteBashCommand( local_cupsd_accessible_commandline );
if( ! local_cupsd_accessible )
+ { // It can take up to a few minutes when a cupsd is started
+ // for the very first time (e.g. on a new installed system)
+ // until the cupsd is actually ready to operate.
+ // E.g. because parsing of thousands of PPDs may need much time.
+ // Therefore enforce waiting one minute now.
+ // (Plain busy message without title.)
+ Popup::ShowFeedback( "", _("The CUPS daemon in not yet accessible.\nWaiting one minute so that it is ready to operate...") );
+ sleep( 60000 );
+ Popup::ClearFeedback();
+ }
+ local_cupsd_accessible = ExecuteBashCommand( local_cupsd_accessible_commandline );
+ if( ! local_cupsd_accessible )
{ Popup::Error( // Popup::Error message:
_("No local running CUPS daemon is accessible.")
);
@@ -155,13 +166,17 @@
);
return false;
}
- // Wait 40 seconds for a restarted cupsd is necessary because
+ // Sleep two seconds in any case so that the re-started cupsd can become ready to operate.
+ // It may need one second for some cleanup before finishing
+ // and one second to become ready to operate after starting.
+ sleep( 2000 );
+ // Wait half a minute for a restarted cupsd is necessary because
// when a "no Browsing info" config is switched to a "get Browsing info" config
// the BrowseInterval in cupsd.conf on remote CUPS servers is by default 30 seconds
// so that the local cupsd should listen at least 31 seconds to get Browsing info
// before e.g. the Overview dialog can be shown with the right current queues.
- Popup::TimedMessage( _("Restarted the CUPS daemon.\nWaiting 40 seconds so that it is ready to operate..."),
- 40
+ Popup::TimedMessage( _("Restarted the CUPS daemon.\nWaiting half a minute so that it is ready to operate..."),
+ 30
);
local_cupsd_accessible = ExecuteBashCommand( local_cupsd_accessible_commandline );
if( ! local_cupsd_accessible )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.16/src/Printer.ycp new/yast2-printer-2.17.17/src/Printer.ycp
--- old/yast2-printer-2.17.16/src/Printer.ycp 2008-09-25 13:55:31.000000000 +0200
+++ new/yast2-printer-2.17.17/src/Printer.ycp 2008-09-26 12:09:23.000000000 +0200
@@ -36,7 +36,6 @@
textdomain "printer";
import "Progress";
-import "Report";
import "Summary";
import "Message";
import "Popup";
@@ -290,11 +289,12 @@
else
{ Popup::ClearFeedback();
}
- Report::Error( // Message of a Report::Error.
- // Only a simple message because this error does not happen on a normal system
- // (i.e. a system which is not totally broken or totally messed up).
- _("Failed to create PPD database.")
- );
+ Popup::ErrorDetails( // Popup::ErrorDetails message.
+ // Only a simple message because this error does not happen on a normal system
+ // (i.e. a system which is not totally broken or totally messed up).
+ _("Failed to create PPD database."),
+ Printerlib::result["stderr"]:""
+ );
return false;
}
if( -1 == SCR::Read( .target.size, database_filename ) )
@@ -305,12 +305,12 @@
{ Popup::ClearFeedback();
}
y2milestone( "Error: %1: file does not exist.", database_filename );
- Report::Error( sformat( // Message of a Report::Error where %1 will be replaced by the file name.
- // Only a simple message because this error does not happen on a normal system
- // (i.e. a system which is not totally broken or totally messed up).
- _("File %1 does not exist."),
- database_filename
- )
+ Popup::Error( sformat( // Message of a Popup::Error where %1 will be replaced by the file name.
+ // Only a simple message because this error does not happen on a normal system
+ // (i.e. a system which is not totally broken or totally messed up).
+ _("File %1 does not exist."),
+ database_filename
+ )
);
return false;
}
@@ -323,12 +323,12 @@
{ Popup::ClearFeedback();
}
y2milestone( "Error: Failed to read %1", database_filename );
- Report::Error( sformat( // Message of a Report::Error where %1 will be replaced by the file name.
- // Only a simple message because this error does not happen on a normal system
- // (i.e. a system which is not totally broken or totally messed up).
- _("Failed to read %1."),
- database_filename
- )
+ Popup::Error( sformat( // Message of a Popup::Error where %1 will be replaced by the file name.
+ // Only a simple message because this error does not happen on a normal system
+ // (i.e. a system which is not totally broken or totally messed up).
+ _("Failed to read %1."),
+ database_filename
+ )
);
ppds = [];
return false;
@@ -410,13 +410,14 @@
else
{ Popup::ClearFeedback();
}
- Report::Error( // Message of a Report::Error.
- // Only a simple message because this error does not happen on a normal system
- // (i.e. a system which is not totally broken or totally messed up).
- // Do not confuse this error with the case when no printer was autodetected.
- // The latter results no error.
- _("Failed to detect printers automatically.")
- );
+ Popup::ErrorDetails( // Popup::ErrorDetails message.
+ // Only a simple message because this error does not happen on a normal system
+ // (i.e. a system which is not totally broken or totally messed up).
+ // Do not confuse this error with the case when no printer was autodetected.
+ // The latter results no error.
+ _("Failed to detect printers automatically."),
+ Printerlib::result["stderr"]:""
+ );
return false;
}
if( -1 == SCR::Read( .target.size, autodetected_printers_filename ) )
@@ -427,12 +428,12 @@
{ Popup::ClearFeedback();
}
y2milestone( "Error: %1: file does not exist.", autodetected_printers_filename );
- Report::Error( sformat( // Message of a Report::Error where %1 will be replaced by the file name.
- // Only a simple message because this error does not happen on a normal system
- // (i.e. a system which is not totally broken or totally messed up).
- _("File %1 does not exist."),
- autodetected_printers_filename
- )
+ Popup::Error( sformat( // Message of a Popup::Error where %1 will be replaced by the file name.
+ // Only a simple message because this error does not happen on a normal system
+ // (i.e. a system which is not totally broken or totally messed up).
+ _("File %1 does not exist."),
+ autodetected_printers_filename
+ )
);
return false;
}
@@ -445,13 +446,13 @@
{ Popup::ClearFeedback();
}
y2milestone( "Error: Failed to read %1", autodetected_printers_filename );
- Report::Error( sformat( // Message of a Report::Error where %1 will be replaced by the file name.
- // Only a simple message because this error does not happen on a normal system
- // (i.e. a system which is not totally broken or totally messed up).
- _("Failed to read %1."),
- autodetected_printers_filename
- )
- );
+ Popup::Error( sformat( // Message of a Popup::Error where %1 will be replaced by the file name.
+ // Only a simple message because this error does not happen on a normal system
+ // (i.e. a system which is not totally broken or totally messed up).
+ _("Failed to read %1."),
+ autodetected_printers_filename
+ )
+ );
connections = [];
return false;
}
@@ -494,36 +495,37 @@
{ // To be safe invalidate selected_queues_index in any case:
selected_queues_index = -1;
if( ! Printerlib::ExecuteBashCommand( autodetect_queues_commandline ) )
- { Report::Error( // Message of a Report::Error.
- // Only a simple message because this error does not happen on a normal system
- // (i.e. a system which is not totally broken or totally messed up).
- // Do not confuse this error with the case when no queue was detected
- // (e.g. simply because there is no queue). This results no error.
- _("Failed to detect print queues.")
- );
+ { Popup::ErrorDetails( // Popup::ErrorDetails message.
+ // Only a simple message because this error does not happen on a normal system
+ // (i.e. a system which is not totally broken or totally messed up).
+ // Do not confuse this error with the case when no queue was detected
+ // (e.g. simply because there is no queue). This results no error.
+ _("Failed to detect print queues."),
+ Printerlib::result["stderr"]:""
+ );
return false;
}
if( -1 == SCR::Read( .target.size, autodetected_queues_filename ) )
{ y2milestone( "Error: %1: file does not exist.", autodetected_queues_filename );
- Report::Error( sformat( // Message of a Report::Error where %1 will be replaced by the file name.
- // Only a simple message because this error does not happen on a normal system
- // (i.e. a system which is not totally broken or totally messed up).
- _("File %1 does not exist."),
- autodetected_queues_filename
- )
- );
+ Popup::Error( sformat( // Message of a Popup::Error where %1 will be replaced by the file name.
+ // Only a simple message because this error does not happen on a normal system
+ // (i.e. a system which is not totally broken or totally messed up).
+ _("File %1 does not exist."),
+ autodetected_queues_filename
+ )
+ );
return false;
}
queues = (list< map< string, string > >)SCR::Read( .target.ycp, autodetected_queues_filename );
if( nil == queues )
{ y2milestone( "Error: Failed to read %1", autodetected_queues_filename );
- Report::Error( sformat( // Message of a Report::Error where %1 will be replaced by the file name.
- // Only a simple message because this error does not happen on a normal system
- // (i.e. a system which is not totally broken or totally messed up).
- _("Failed to read %1."),
- autodetected_queues_filename
- )
- );
+ Popup::Error( sformat( // Message of a Popup::Error where %1 will be replaced by the file name.
+ // Only a simple message because this error does not happen on a normal system
+ // (i.e. a system which is not totally broken or totally messed up).
+ _("Failed to read %1."),
+ autodetected_queues_filename
+ )
+ );
queues = [];
return false;
}
@@ -551,38 +553,39 @@
}
string commandline = determine_printer_driver_options_commandline + queue_name;
if( ! Printerlib::ExecuteBashCommand( commandline ) )
- { Report::Error( sformat( // Message of a Report::Error where %1 will be replaced by the queue name.
- // Only a simple message because this error does not happen on a normal system
- // (i.e. a system which is not totally broken or totally messed up).
- // Do not confuse this error with the case when no queue was detected
- // (e.g. simply because there is no queue). This results no error.
- _("Failed to determine driver options for queue %1."),
- queue_name
- )
- );
+ { Popup::ErrorDetails( sformat( // Popup::ErrorDetails message where %1 will be replaced by the queue name.
+ // Only a simple message because this error does not happen on a normal system
+ // (i.e. a system which is not totally broken or totally messed up).
+ // Do not confuse this error with the case when no queue was detected
+ // (e.g. simply because there is no queue). This results no error.
+ _("Failed to determine driver options for queue %1."),
+ queue_name
+ ),
+ Printerlib::result["stderr"]:""
+ );
return false;
}
if( -1 == SCR::Read( .target.size, driver_options_filename ) )
{ y2milestone( "Error: %1: file does not exist.", driver_options_filename );
- Report::Error( sformat( // Message of a Report::Error where %1 will be replaced by the file name.
- // Only a simple message because this error does not happen on a normal system
- // (i.e. a system which is not totally broken or totally messed up).
- _("File %1 does not exist."),
- driver_options_filename
- )
- );
+ Popup::Error( sformat( // Message of a Popup::Error where %1 will be replaced by the file name.
+ // Only a simple message because this error does not happen on a normal system
+ // (i.e. a system which is not totally broken or totally messed up).
+ _("File %1 does not exist."),
+ driver_options_filename
+ )
+ );
return false;
}
driver_options = (list< map< string, any > >)SCR::Read( .target.ycp, driver_options_filename );
if( nil == driver_options )
{ y2milestone( "Error: Failed to read %1", driver_options_filename );
- Report::Error( sformat( // Message of a Report::Error where %1 will be replaced by the file name.
- // Only a simple message because this error does not happen on a normal system
- // (i.e. a system which is not totally broken or totally messed up).
- _("Failed to read %1."),
- driver_options_filename
- )
- );
+ Popup::Error( sformat( // Message of a Popup::Error where %1 will be replaced by the file name.
+ // Only a simple message because this error does not happen on a normal system
+ // (i.e. a system which is not totally broken or totally messed up).
+ _("Failed to read %1."),
+ driver_options_filename
+ )
+ );
driver_options = [];
return false;
}
@@ -745,13 +748,13 @@
{ // Invalidate selected_queues_index to be safe:
selected_queues_index = -1;
if( ! AutodetectQueues() )
- { Report::Error( // Message of a Report::Error.
- // Only a simple message because this error does not happen on a normal system
- // (i.e. a system which is not totally broken or totally messed up).
- // Do not confuse this error with the case when no queue was detected
- // (e.g. simply because there is no queue). This results no error.
- _("Cannot show print queues (failed to detect print queues).")
- );
+ { Popup::Error( // Message of a Popup::Error.
+ // Only a simple message because this error does not happen on a normal system
+ // (i.e. a system which is not totally broken or totally messed up).
+ // Do not confuse this error with the case when no queue was detected
+ // (e.g. simply because there is no queue). This results no error.
+ _("Cannot show print queues (failed to detect print queues).")
+ );
// Return an empty list:
return [];
}
@@ -856,11 +859,11 @@
);
// AutodetectPrinters overwrites the existing connections list:
if( ! AutodetectPrinters() )
- { Report::Error( // Message of a Report::Error.
- // Only a simple message because before the function AutodetectPrinters
- // was called and this function would have shown more specific messages.
- _("Failed to autodetect printers.")
- );
+ { Popup::Error( // Message of a Popup::Error.
+ // Only a simple message because before the function AutodetectPrinters
+ // was called and this function would have shown more specific messages.
+ _("Failed to autodetect printers.")
+ );
// Return only the existing connection wizard connections which is usally an empty list:
return connection_wizard_connections;
}
@@ -1091,11 +1094,11 @@
{ // Create the driver database only if the ppds list is empty:
if( size( ppds ) < 1 )
{ if( ! CreateDatabase() )
- { Report::Error( // Message of a Report::Error.
- // Only a simple message because before the function CreateDatabase
- // was called and this function would have shown more specific messages.
- _("Failed to create the printer driver database.")
- );
+ { Popup::Error( // Message of a Popup::Error.
+ // Only a simple message because before the function CreateDatabase
+ // was called and this function would have shown more specific messages.
+ _("Failed to create the printer driver database.")
+ );
// Return an empty list:
return [];
}
@@ -1571,11 +1574,11 @@
{ // Run DetermineDriverOptions if the driver_options list is empty:
if( size( driver_options ) < 1 )
{ if( ! DetermineDriverOptions( "" ) )
- { Report::Error( // Message of a Report::Error.
- // Only a simple message because this is only a fallback case
- // which should not happen at all:
- _("Failed to determine the driver options.")
- );
+ { Popup::Error( // Message of a Popup::Error.
+ // Only a simple message because this is only a fallback case
+ // which should not happen at all:
+ _("Failed to determine the driver options.")
+ );
// Return at least a list with only a fallback string so that the user is informed:
return [ _("No driver options available") ];
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.16/src/sharing.ycp new/yast2-printer-2.17.17/src/sharing.ycp
--- old/yast2-printer-2.17.16/src/sharing.ycp 2008-09-25 17:40:13.000000000 +0200
+++ new/yast2-printer-2.17.17/src/sharing.ycp 2008-09-26 11:53:42.000000000 +0200
@@ -301,22 +301,48 @@
y2milestone( "publish_to_local_network_check_box value: '%1'", publish_to_local_network );
interface_table_items = (list<term>)UI::QueryWidget( `interface_table, `Items );
y2milestone( "interface_table_items: %1", interface_table_items );
- // Keep deny_remote_access.
- // Ignore if other settings may have been changed
- // because whatever Allow and BrowseAddress stuff is meaningless
- // if remote access is denied at all:
- if( deny_remote_access && initial_deny_remote_access )
- { // Nothing has changed:
- return true;
+ string allow_values = "";
+ string browse_address_values = "";
+ foreach( term interface_table_item,
+ interface_table_items,
+ { string interface_name = interface_table_item[1]:"";
+ string is_published = interface_table_item[2]:"";
+ if( "" != interface_name )
+ { allow_values = "@IF(" + interface_name + ") " + allow_values;
+ // Add the inferface nameto browse_address_values
+ // only if remote access is allowed for this interface:
+ if( "yes" == is_published )
+ { browse_address_values = "@IF(" + interface_name + ") " + browse_address_values ;
+ }
+ }
+ }
+ );
+ if( allow_local_network_access )
+ { allow_values = "@LOCAL " + allow_values;
+ // Add "@LOCAL" to browse_address_values
+ // only if remote access is allowed for "@LOCAL":
+ if( publish_to_local_network )
+ { browse_address_values = "@LOCAL " + browse_address_values;
+ }
}
- // Switch to deny_remote_access:
+ y2milestone( "allow_values: %1", allow_values );
+ y2milestone( "browse_address_values: %1", browse_address_values );
+ // Any kind of deny_remote_access:
// Ignore if other settings may have been changed too
// because whatever Allow and BrowseAddress stuff is meaningless
// if remote access is denied at all:
- // When both the deny_remote_access_radio_button and the allow_remote_access_radio_button are un-checked,
- // assume the user wants deny_remote_access (via '! allow_remote_access') because this is the safe setting:
- if( deny_remote_access || ! allow_remote_access )
- { sharing_has_changed = true;
+ // When both the deny_remote_access_radio_button and the allow_remote_access_radio_button
+ // are un-checked, assume the user wants deny_remote_access (via '! allow_remote_access')
+ // because this is the safe setting (even when allow_values is not empty):
+ if( deny_remote_access
+ || ! allow_remote_access
+ || "" == allow_values
+ )
+ { if( initial_deny_remote_access )
+ { // Nothing has changed:
+ return true;
+ }
+ sharing_has_changed = true;
// It leads to inconsistencies if only Only set 'Listen localhost' would be set
// but Allow and BrowseAddress enties would be kept because when there are
// BrowseAddress enties, it must listen on matching remote interfaces
@@ -337,6 +363,11 @@
);
return false;
}
+ // Do not change the global "Browsing On/Off" entry in cupsd.conf
+ // because "Browsing Off" disables also receiving
+ // of remote queue information from remote CUPS servers
+ // which might be needed by the "Print Via Network" dialog.
+ // Instead remove only the "BrowseAddress" entries in cupsd.conf:
if( ! Printerlib::ExecuteBashCommand( Printerlib::yast_bin_dir + "modify_cupsd_conf BrowseAddress none" ) )
{ Popup::ErrorDetails( // Popup::ErrorDetails message.
// Do not change or translate "BrowseAddress", it is a system settings name.
@@ -391,30 +422,8 @@
{ // Nothing has changed:
return true;
}
- string allow_values = "";
- string browse_address_values = "";
- foreach( term interface_table_item,
- interface_table_items,
- { string interface_name = interface_table_item[1]:"";
- string is_published = interface_table_item[2]:"";
- if( "" != interface_name )
- { allow_values = "@IF(" + interface_name + ") " + allow_values;
- // Add the inferface nameto browse_address_values
- // only if remote access is allowed for this interface:
- if( "yes" == is_published )
- { browse_address_values = "@IF(" + interface_name + ") " + browse_address_values ;
- }
- }
- }
- );
- if( allow_local_network_access )
- { allow_values = "@LOCAL " + allow_values;
- // Add "@LOCAL" to browse_address_values
- // only if remote access is allowed for "@LOCAL":
- if( publish_to_local_network )
- { browse_address_values = "@LOCAL " + browse_address_values;
- }
- }
+ // When allow_values is empty, it is a deny_remote_access case, see above.
+ // Therefore allow_values is non-empty here:
if( ! Printerlib::ExecuteBashCommand( Printerlib::yast_bin_dir
+ "modify_cupsd_conf Allow '"
+ allow_values
@@ -426,27 +435,39 @@
// Do not change or translate "Allow", it is a system settings name.
_("Failed to set 'Allow' entries '%1' in /etc/cups/cupsd.conf"),
allow_values
- ),
+ ),
Printerlib::result["stderr"]:""
);
return false;
}
- if( ! Printerlib::ExecuteBashCommand( Printerlib::yast_bin_dir
- + "modify_cupsd_conf BrowseAddress '"
- + browse_address_values
- + "'"
- )
- )
- { Popup::ErrorDetails( sformat( // Popup::ErrorDetails message
- // where %1 will be replaced by one or more system settings values.
- // // Do not change or translate "BrowseAddress", it is a system settings name.
- _("Failed to set 'BrowseAddress' entries '%1' in /etc/cups/cupsd.conf"),
- browse_address_values
- ),
- Printerlib::result["stderr"]:""
- );
- return false;
+ if( "" != browse_address_values )
+ { if( ! Printerlib::ExecuteBashCommand( Printerlib::yast_bin_dir
+ + "modify_cupsd_conf BrowseAddress '"
+ + browse_address_values
+ + "'"
+ )
+ )
+ { Popup::ErrorDetails( sformat( // Popup::ErrorDetails message
+ // where %1 will be replaced by one or more system settings values.
+ // Do not change or translate "BrowseAddress", it is a system settings name.
+ _("Failed to set 'BrowseAddress' entries '%1' in /etc/cups/cupsd.conf"),
+ browse_address_values
+ ),
+ Printerlib::result["stderr"]:""
+ );
+ return false;
+ }
+ // Having "BrowseAddress" entries requires "Browsing On",
+ // otherwise browsing information would not be sent at all:
+ if( ! Printerlib::ExecuteBashCommand( Printerlib::yast_bin_dir + "modify_cupsd_conf Browsing On" ) )
+ { Popup::ErrorDetails( // Popup::ErrorDetails message:
+ _("Failed to set 'Browsing On' in /etc/cups/cupsd.conf"),
+ Printerlib::result["stderr"]:""
+ );
+ return false;
+ }
}
+ // Only if all the above was successfully set, Listen is set too:
// Currently 'Listen *:631' is simply set for any kind of remote access
// because the Listen directive supports only network addresses as value.
// Neither 'Listen @LOCAL' nor 'Listen @IF(name)' is supported.
@@ -732,17 +753,45 @@
map ret = nil;
map< string, string > interface_map = nil;
case `add_interface :
+ current_item = (integer)UI::QueryWidget( `interface_table, `CurrentItem );
interface_map = showInterfacePopup( "", false );
- if( interface_map != nil )
- { interface_table_items = (list<term>)UI::QueryWidget( `interface_table, `Items );
- interface_table_items = add( interface_table_items,
- `item( `id(size(interface_table_items)),
- interface_map["interface_name"]:"",
- interface_map["is_published"]:""
- )
- );
+ boolean is_in_table = false;
+ if( interface_map != nil)
+ { interface_table_items = [];
+ foreach( term interface_table_item,
+ (list<term>)UI::QueryWidget( `interface_table, `Items),
+ { if( interface_map["interface_name"]:"new" != interface_table_item[1]:"old" )
+ { interface_table_items = add( interface_table_items,
+ `item( `id(size(interface_table_items)),
+ interface_table_item[1]:"",
+ interface_table_item[2]:""
+ )
+ );
+ }
+ else
+ { is_in_table = true;
+ y2milestone( "Changing interface_table_item %1 with interface_map %2", interface_table_item, interface_map );
+ interface_table_items = add( interface_table_items,
+ `item( `id(size(interface_table_items)),
+ interface_map["interface_name"]:"",
+ interface_map["is_published"]:""
+ )
+ );
+ }
+ }
+ );
+ if( ! is_in_table )
+ { y2milestone( "Adding interface_map %1", interface_map );
+ interface_table_items = add( interface_table_items,
+ `item( `id(size(interface_table_items)),
+ interface_map["interface_name"]:"",
+ interface_map["is_published"]:""
+ )
+ );
+ current_item = size(interface_table_items) - 1;
+ }
UI::ChangeWidget( `interface_table, `Items, interface_table_items );
- UI::ChangeWidget( `interface_table, `CurrentItem, size(interface_table_items) - 1 );
+ UI::ChangeWidget( `interface_table, `CurrentItem, current_item );
}
break;
case `edit_interface :
@@ -764,7 +813,7 @@
);
}
else
- { y2milestone( "Changing interface_table_item %1", interface_table_item );
+ { y2milestone( "Changing interface_table_item %1 with interface_map %2", interface_table_item, interface_map );
interface_table_items = add( interface_table_items,
`item( `id(size(interface_table_items)),
interface_map["interface_name"]:"",
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.16/VERSION new/yast2-printer-2.17.17/VERSION
--- old/yast2-printer-2.17.16/VERSION 2008-09-25 17:48:15.000000000 +0200
+++ new/yast2-printer-2.17.17/VERSION 2008-09-26 12:33:51.000000000 +0200
@@ -1 +1 @@
-2.17.16
+2.17.17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org