Hello community,
here is the log from the commit of package yast2-printer
checked in at Thu Nov 6 22:37:35 CET 2008.
--------
--- yast2-printer/yast2-printer.changes 2008-11-05 14:01:28.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-printer/yast2-printer.changes 2008-11-06 17:43:47.632104000 +0100
@@ -1,0 +2,20 @@
+Thu Nov 6 17:36:12 CET 2008 - jsmeix@suse.de
+
+- Fixed a quoting bug in the Modify queue dialog.
+- Renamed buttons according to the new style guide
+ by manually overwriting the Wizard module defaults
+ (compare Novell/Suse Bugzilla bnc#440560).
+- 2.17.34
+
+-------------------------------------------------------------------
+Thu Nov 6 12:17:35 CET 2008 - jsmeix@suse.de
+
+- Fixed driver preselection bug in Printer.ycp.
+- Fixed dialog layout of the Add New Printer Configuration
+ dialog and of the Modify queue dialog so that
+ both dialogs work also o.k. in ncurses mode.
+ This mitigates also the issue in
+ Novell/Suse Bugzilla bnc#438875.
+- 2.17.33
+
+-------------------------------------------------------------------
@@ -14,2 +34,2 @@
- and of the Printing via Network dialog
- that both dialogs work also o.k. in ncurses mode.
+ and of the Printing via Network dialog so that
+ both dialogs work also o.k. in ncurses mode.
calling whatdependson for head-i586
Old:
----
yast2-printer-2.17.32.tar.bz2
New:
----
yast2-printer-2.17.34.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-printer.spec ++++++
--- /var/tmp/diff_new_pack.vb5361/_old 2008-11-06 22:37:18.000000000 +0100
+++ /var/tmp/diff_new_pack.vb5361/_new 2008-11-06 22:37:18.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-printer (Version 2.17.32)
+# spec file for package yast2-printer (Version 2.17.34)
#
# 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.32
+Version: 2.17.34
Release: 1
License: GPL v2 or later
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-printer-2.17.32.tar.bz2
+Source0: yast2-printer-2.17.34.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.32
+%setup -n yast2-printer-2.17.34
%build
%{prefix}/bin/y2tool y2autoconf
@@ -118,6 +118,20 @@
%exclude %{prefix}/share/doc/packages/yast2-printer/COPYING
%exclude %{prefix}/share/doc/packages/yast2-printer/README
%changelog
+* Thu Nov 06 2008 jsmeix@suse.de
+- Fixed a quoting bug in the Modify queue dialog.
+- Renamed buttons according to the new style guide
+ by manually overwriting the Wizard module defaults
+ (compare Novell/Suse Bugzilla bnc#440560).
+- 2.17.34
+* Thu Nov 06 2008 jsmeix@suse.de
+- Fixed driver preselection bug in Printer.ycp.
+- Fixed dialog layout of the Add New Printer Configuration
+ dialog and of the Modify queue dialog so that
+ both dialogs work also o.k. in ncurses mode.
+ This mitigates also the issue in
+ Novell/Suse Bugzilla bnc#438875.
+- 2.17.33
* Wed Nov 05 2008 jsmeix@suse.de
- Fixed bugs in the Share Printers dialog:
Apply settings when the user only changed
@@ -129,8 +143,8 @@
and it logs its changes as comments in cupsd.conf.
(See Novell/Suse Bugzilla bnc#441370)
- Fixed dialog layout of the Share Printers dialog
- and of the Printing via Network dialog
- that both dialogs work also o.k. in ncurses mode.
+ and of the Printing via Network dialog so that
+ both dialogs work also o.k. in ncurses mode.
- 2.17.32
* Tue Nov 04 2008 jsmeix@suse.de
- Dialog layout fixes for the Share Printers dialog
++++++ yast2-printer-2.17.32.tar.bz2 -> yast2-printer-2.17.34.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.32/configure new/yast2-printer-2.17.34/configure
--- old/yast2-printer-2.17.32/configure 2008-11-05 13:56:13.000000000 +0100
+++ new/yast2-printer-2.17.34/configure 2008-11-06 17:41:31.000000000 +0100
@@ -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.32.
+# Generated by GNU Autoconf 2.61 for yast2-printer 2.17.34.
#
# 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.32'
-PACKAGE_STRING='yast2-printer 2.17.32'
+PACKAGE_VERSION='2.17.34'
+PACKAGE_STRING='yast2-printer 2.17.34'
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.32 to adapt to many kinds of systems.
+\`configure' configures yast2-printer 2.17.34 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.32:";;
+ short | recursive ) echo "Configuration of yast2-printer 2.17.34:";;
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.32
+yast2-printer configure 2.17.34
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.32, which was
+It was created by yast2-printer $as_me 2.17.34, 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.32'
+ VERSION='2.17.34'
cat >>confdefs.h <<_ACEOF
@@ -2409,7 +2409,7 @@
-VERSION="2.17.32"
+VERSION="2.17.34"
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.32, which was
+This file was extended by yast2-printer $as_me 2.17.34, 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.32
+yast2-printer config.status 2.17.34
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.32/configure.in new/yast2-printer-2.17.34/configure.in
--- old/yast2-printer-2.17.32/configure.in 2008-11-05 13:56:08.000000000 +0100
+++ new/yast2-printer-2.17.34/configure.in 2008-11-06 17:41:27.000000000 +0100
@@ -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.32, http://bugs.opensuse.org/, yast2-printer)
+AC_INIT(yast2-printer, 2.17.34, 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.32"
+VERSION="2.17.34"
RPMNAME="yast2-printer"
MAINTAINER="Michal Zugec "
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.32/src/basicadd.ycp new/yast2-printer-2.17.34/src/basicadd.ycp
--- old/yast2-printer-2.17.32/src/basicadd.ycp 2008-11-04 14:14:27.000000000 +0100
+++ new/yast2-printer-2.17.34/src/basicadd.ycp 2008-11-06 15:24:50.000000000 +0100
@@ -44,7 +44,8 @@
* @return dialog result
*/
any BasicAddDialog()
-{ // Caption for the "Add Printer" dialog (BasicAddDialog):
+{ y2milestone( "entering BasicAddDialog" );
+ // Caption for the "Add Printer" dialog (BasicAddDialog):
string caption = _("Add New Printer Configuration");
string driver_filter_string = "BasicAddDialog";
string driver_filter_input_text = "";
@@ -62,10 +63,24 @@
}
term contents = `VBox
( `VBox
- ( `Left
- ( `Label( // Caption for a Table with a list of printer connections:
- _("Determine Connection")
- )
+ ( `HBox
+ ( `Label
+ ( // Caption for a Table with a list of printer connections:
+ _("Determine Connection")
+ ),
+ `HStretch(),
+ `PushButton
+ ( `id(`more_connections),
+ // Label of a PushButton to show more available printer connections
+ // in the Table with a list of printer connections:
+ _("&More Connections")
+ ),
+ `PushButton
+ ( `id(`connection_wizard),
+ // Label of a PushButton to go to the "Connection Wizard"
+ // to specify the printer connection individually:
+ _("Connection &Wizard")
+ )
),
`ReplacePoint
( `id(`connection_selection_replace_point),
@@ -91,22 +106,6 @@
),
Printer::ConnectionItems( "BasicAddDialog" )
)
- ),
- `Right
- ( `HBox
- ( `PushButton
- ( `id(`more_connections),
- // Label of a PushButton to show more available printer connections
- // in the Table with a list of printer connections:
- _("&More Connections")
- ),
- `PushButton
- ( `id(`connection_wizard),
- // Label of a PushButton to go to the "Connection Wizard"
- // to specify the printer connection individually:
- _("Connection &Wizard")
- )
- )
)
),
`VStretch(),
@@ -133,6 +132,12 @@
// Label of a PushButton to search a list for a search string
// and then show the search result:
_("&Show Matching Drivers")
+ ),
+ `PushButton
+ ( `id(`add_driver),
+ // Label of a PushButton to go to the "Add Driver" dialog
+ // to install a new driver (and perhaps download it before):
+ _("&Add Driver")
)
),
`ReplacePoint
@@ -147,14 +152,6 @@
"",
[ `item( `id( -1 ), _("Select a driver.") ) ]
)
- ),
- `Right
- ( `PushButton
- ( `id(`add_driver),
- // Label of a PushButton to go to the "Add Driver" dialog
- // to install a new driver (and perhaps download it before):
- _("&Add Driver")
- )
)
),
`VStretch(),
@@ -171,15 +168,24 @@
`HStretch()
)
);
+ // According to http://en.opensuse.org/YaST/Style_Guide#Single_Configuration.2FOverview.2FEd...
+ // there is no longer a "abort" functionality which exits the whole module.
+ // Instead this button is now named "Cancel" and its functionality is
+ // to go back to the Overview dialog (i.e. what the "back" button would do)
+ // because it reads "Cancel - Closes the window and returns to the overview."
+ // Therefore the button with the "abort" functionality is not shown at all
+ // and the button with the "back" functionality is named "Cancel".
+ // According to http://en.opensuse.org/YaST/Style_Guide#Single_Configuration.2FOverview.2FEd...
+ // the "finish" button in a single (step) configuration dialog must now be named "OK".
Wizard::SetContentsButtons( caption,
contents,
HELPS["basic_add_dialog"]:"",
- Label::BackButton(),
- // Set a different label for the "next" button
- // (i.e. the lower right button which results `next as UI::UserInput).
- // This button finishes the "add" procedure:
- _("&Finish Add")
+ // Set a new label for the "back" button, see the comment above:
+ Label::CancelButton(),
+ // Set a new label for the "next" button, see the comment above:
+ Label::OKButton()
);
+ Wizard::HideAbortButton();
UI::FakeUserInput( `connection_selection );
any ret = nil;
while(true)
@@ -249,7 +255,6 @@
queue_name = validated_queue_name;
}
Wizard::DisableBackButton();
- Wizard::DisableAbortButton();
Wizard::DisableNextButton();
if( ! Printer::AddQueue( queue_name ) )
{ Popup::Error( // Message of a Popup::Error
@@ -263,7 +268,6 @@
// in particular when no local queues were shown before:
Printer::queue_filter_show_local = true;
Wizard::EnableBackButton();
- Wizard::EnableAbortButton();
Wizard::EnableNextButton();
// Exit this dialog in any case:
break;
@@ -416,6 +420,7 @@
y2milestone( "Ignoring unexpected returncode in BasicAddDialog: %1", ret );
continue;
}
+ y2milestone( "leaving BasicAddDialog" );
return ret;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.32/src/basicmodify.ycp new/yast2-printer-2.17.34/src/basicmodify.ycp
--- old/yast2-printer-2.17.32/src/basicmodify.ycp 2008-11-04 14:14:27.000000000 +0100
+++ new/yast2-printer-2.17.34/src/basicmodify.ycp 2008-11-06 17:32:43.000000000 +0100
@@ -44,7 +44,8 @@
* @return dialog result
*/
any BasicModifyDialog()
-{ string commandline = "";
+{ y2milestone( "entering BasicModifyDialog for queue '%1'", Printer::queues[Printer::selected_queues_index]:$[] );
+ string commandline = "";
string name = Printer::queues[Printer::selected_queues_index,"name"]:"";
string uri = Printer::queues[Printer::selected_queues_index,"uri"]:"";
string description = Printer::queues[Printer::selected_queues_index,"description"]:"";
@@ -245,10 +246,24 @@
}
term contents = `VBox
( `VBox
- ( `Left
- ( `Label( // Caption for a Table with a list of printer connections:
- _("Connection")
- )
+ ( `HBox
+ ( `Label
+ ( // Caption for a Table with a list of printer connections:
+ _("Connection")
+ ),
+ `HStretch(),
+ `PushButton
+ ( `id(`more_connections),
+ // Label of a PushButton to show more available printer connections
+ // in the Table with a list of printer connections:
+ _("&More Connections")
+ ),
+ `PushButton
+ ( `id(`connection_wizard),
+ // Label of a PushButton to go to the "Connection Wizard"
+ // to specify the printer connection individually:
+ _("Connection &Wizard")
+ )
),
`ReplacePoint
( `id(`connection_selection_replace_point),
@@ -274,22 +289,6 @@
),
prepend( Printer::ConnectionItems( "BasicAddDialog" ), current_connection )
)
- ),
- `Right
- ( `HBox
- ( `PushButton
- ( `id(`more_connections),
- // Label of a PushButton to show more available printer connections
- // in the Table with a list of printer connections:
- _("&More Connections")
- ),
- `PushButton
- ( `id(`connection_wizard),
- // Label of a PushButton to go to the "Connection Wizard"
- // to specify the printer connection individually:
- _("Connection &Wizard")
- )
- )
)
),
`VStretch(),
@@ -316,6 +315,12 @@
// Label of a PushButton to search a list for a search string
// and then show the search result:
_("&Show Matching Drivers")
+ ),
+ `PushButton
+ ( `id(`add_driver),
+ // Label of a PushButton to go to the "Add Driver" dialog
+ // to install a new driver (and perhaps download it before):
+ _("&Add Driver")
)
),
`ReplacePoint
@@ -337,14 +342,6 @@
"",
prepend( Printer::DriverItems( driver_filter_string, false ), current_driver )
)
- ),
- `Right
- ( `PushButton
- ( `id(`add_driver),
- // Label of a PushButton to go to the "Add Driver" dialog
- // to install a new driver (and perhaps download it before):
- _("&Add Driver")
- )
)
),
`VStretch(),
@@ -392,15 +389,24 @@
)
)
);
+ // According to http://en.opensuse.org/YaST/Style_Guide#Single_Configuration.2FOverview.2FEd...
+ // there is no longer a "abort" functionality which exits the whole module.
+ // Instead this button is now named "Cancel" and its functionality is
+ // to go back to the Overview dialog (i.e. what the "back" button would do)
+ // because it reads "Cancel - Closes the window and returns to the overview."
+ // Therefore the button with the "abort" functionality is not shown at all
+ // and the button with the "back" functionality is named "Cancel".
+ // According to http://en.opensuse.org/YaST/Style_Guide#Single_Configuration.2FOverview.2FEd...
+ // the "finish" button in a single (step) configuration dialog must now be named "OK".
Wizard::SetContentsButtons( caption,
contents,
HELPS["basic_modify_dialog"]:"",
- Label::BackButton(),
- // Set a different label for the "next" button
- // (i.e. the lower right button which results `next as UI::UserInput).
- // This button finishes the "add" procedure:
- _("&Finish Modify")
+ // Set a new label for the "back" button, see the comment above:
+ Label::CancelButton(),
+ // Set a new label for the "next" button, see the comment above:
+ Label::OKButton()
);
+ Wizard::HideAbortButton();
any ret = nil;
while(true)
{ ret = UI::UserInput();
@@ -444,17 +450,21 @@
}
}
}
- string description_input = (string)UI::QueryWidget( `id(`description_input), `Value);
+ string description_input = (string)UI::QueryWidget( `id(`description_input), `Value );
+ // Delete ' characters because they are used for quoting in the bash commandline:
+ description_input = deletechars( description_input, "'" );
if( description_input != description )
{ commandline = commandline + " -D '" + description_input + "'";
something_has_changed = true;
}
- string location_input = (string)UI::QueryWidget( `id(`location_input), `Value);
+ string location_input = (string)UI::QueryWidget( `id(`location_input), `Value );
+ // Delete ' characters because they are used for quoting in the bash commandline:
+ location_input = deletechars( location_input, "'" );
if( location_input != location )
{ commandline = commandline + " -L '" + location_input + "'";
something_has_changed = true;
}
- boolean is_default_input = (boolean)UI::QueryWidget( `id(`default_queue_checkbox), `Value);
+ boolean is_default_input = (boolean)UI::QueryWidget( `id(`default_queue_checkbox), `Value );
if( is_default_input != is_default )
{ something_has_changed = true;
if( is_default_input )
@@ -497,18 +507,17 @@
}
if( something_has_changed )
{ Wizard::DisableBackButton();
- Wizard::DisableAbortButton();
Wizard::DisableNextButton();
if( ! Printerlib::ExecuteBashCommand( commandline ) )
- { Popup::Error( // Message of a Popup::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).
- sformat( _("Failed to modify %1."), name )
- );
+ { Popup::ErrorDetails( // Message of a Popup::ErrorDetails
+ // 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).
+ sformat( _("Failed to modify %1."), name ),
+ Printerlib::result["stderr"]:""
+ );
}
Wizard::EnableBackButton();
- Wizard::EnableAbortButton();
Wizard::EnableNextButton();
}
else
@@ -733,7 +742,9 @@
continue;
}
// selected_ppd_index is -1 for the currently used driver
- // which is an invalid index in the ppds list because
+ // and also for a possible dummy entry "Select a driver" which is inserted
+ // by the DriverItems function when no driver was preselected.
+ // -1 is an invalid index in the ppds list and
// it means that the driver is not to be exchanged.
// To be safe that the currently used driver cannot be exchanged
// Printer::selected_ppds_index is set to -1 in this case.
@@ -753,19 +764,29 @@
}
if( selected_ppd_index >= 0 )
{ // When the currently used driver is to be exchanged,
- // the widgets to change options for the currently used driver are removed:
- UI::ReplaceWidget( `id(`paper_choice_and_driver_options_replace_point),
- `Empty()
- );
+ // 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() );
+ string new_description = Printer::ppds[selected_ppd_index,"nickname"]:"";
+ if( "" != model
+ && "unknown" != tolower( model )
+ )
+ { new_description = model + " with driver " + new_description;
+ }
+ // Delete ' characters because they are used for quoting in the bash commandline:
+ new_description = deletechars( new_description, "'" );
+ UI::ChangeWidget( `id(`description_input), `Value, new_description );
}
else
{ // When the currently used driver is re-selected,
- // the widgets to change options for the currently used driver are recreated:
+ // the widgets to change options for the currently used driver are recreated and
+ // the description_input field is restored with the current description of the queue:
UI::ReplaceWidget( `id(`paper_choice_and_driver_options_replace_point),
`VBox( `Left( paper_choice_content ),
`Left( driver_options_content )
)
);
+ UI::ChangeWidget( `id(`description_input), `Value, description );
}
continue;
}
@@ -802,6 +823,7 @@
y2milestone( "Ignoring unexpected returncode in BasicModifyDialog: %1", ret );
continue;
}
+ y2milestone( "leaving BasicModifyDialog" );
return ret;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.32/src/driveradd.ycp new/yast2-printer-2.17.34/src/driveradd.ycp
--- old/yast2-printer-2.17.32/src/driveradd.ycp 2008-11-04 14:14:27.000000000 +0100
+++ new/yast2-printer-2.17.34/src/driveradd.ycp 2008-11-06 15:24:37.000000000 +0100
@@ -162,16 +162,26 @@
),
`VStretch()
);
+ // According to http://en.opensuse.org/YaST/Style_Guide#Single_Configuration.2FOverview.2FEd...
+ // there is no longer a "abort" functionality which exits the whole module.
+ // Instead this button is now named "Cancel" and its functionality is
+ // to go back to the Overview dialog (i.e. what the "back" button would do)
+ // because it reads "Cancel - Closes the window and returns to the overview."
+ // In this case the "overview" is not the actual Overview dialog but the dialog
+ // from which this AddDriverDialog was called i.e. BasicAddDialog or BasicModifyDialog.
+ // Therefore the button with the "abort" functionality is not shown at all
+ // and the button with the "back" functionality is named "Cancel".
+ // According to http://en.opensuse.org/YaST/Style_Guide#Single_Configuration.2FOverview.2FEd...
+ // the "finish" button in a single (step) configuration dialog must now be named "OK".
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()
+ // Set a new label for the "back" button, see the comment above:
+ Label::CancelButton(),
+ // Set a new label for the "next" button, see the comment above:
+ Label::OKButton()
);
+ Wizard::HideAbortButton();
any ret = nil;
while(true)
{ ret = UI::UserInput();
@@ -211,7 +221,6 @@
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
@@ -262,51 +271,60 @@
{ if( hplip_install )
{ // When hpijs-standalone is installed, it must be removed first of all
// because hpijs-standalone conflicts with hplip-hpijs which is required by hplip.
+ // It can lead to an almost endless sequence of further problems
+ // when hpijs-standalone is removed by the package management system
+ // and because we do want to get rid of it, it is removed by plain rpm:
if( Printerlib::TestAndInstallPackage( "hpijs-standalone", "installed" ) )
- { Printerlib::TestAndInstallPackage( "hpijs-standalone", "remove" );
+ { Printerlib::ExecuteBashCommand( "rpm -e --nodeps hpijs-standalone" );
}
- if( Printerlib::TestAndInstallPackage( "hplip", "install" ) )
- { package_changed = true;
- }
- else
- { // We are here either when the user has rejected to install hplip
- // or if the installation of hplip has actually failed.
- // Installation of hplip may have failed because
- // an old hplip-hpijs may have been still installed
- // (hplip requires the exact matching hplip-hpijs version).
- // Therefore here a special error handling if hplip-hpijs is installed.
- // This special error handling would be also done when hplip-hpijs is installed
- // and the user has rejected to install hplip but in this very special case
- // the user just needs to continue to reject all the stuff to get out
- // without any changes in his installed packages.
- // Unfortunately even PackageSystem::CheckAndInstallPackagesInteractive(["hplip"])
- // does neither show a useful error message why an installation failed to the user
- // (the SATResolver reports the problems and solutions perfectly in y2log)
- // nor does it let the user do any useful error handling
- // (it does not let the user choose one of the solutions of the SATResolver)
- // except a blind and trivial "continue" or "cancel".
- // It even exits with true if the user decided to "continue" in case of an error
- // so that the caller cannot distinguish easily if it was a successful installation
- // or if the installation failed but the user decided to "continue" nevertheless.
- // Therefore PackageSystem::CheckAndInstallPackagesInteractive(["hplip"])
- // is totally useless for me here and therefore I implement some
- // best guess and best effort error handling here on my own.
- if( Printerlib::TestAndInstallPackage( "hplip-hpijs", "installed" ) )
- { if( Printerlib::TestAndInstallPackage( "hplip-hpijs", "remove" ) )
- { // Try again to install hplip only if hplip-hpijs was actually removed.
- if( Printerlib::TestAndInstallPackage( "hplip", "install" ) )
- { package_changed = true;
- }
- else
- { // Very special error handling:
- // For whatever reason hpijs-standalone becomes installed on openSUSE 11.0
- // by whatever magic automatically after hplip-hpijs was removed
- // but hpijs-standalone conflicts with hplip-hpijs which is required by hplip.
- if( Printerlib::TestAndInstallPackage( "hpijs-standalone", "installed" ) )
- { if( Printerlib::TestAndInstallPackage( "hpijs-standalone", "remove" ) )
- { // Try again to install hplip only if hpijs-standalone was actually removed.
- if( Printerlib::TestAndInstallPackage( "hplip", "install" ) )
- { package_changed = true;
+ if( ! Printerlib::TestAndInstallPackage( "hpijs-standalone", "installed" ) )
+ { if( Printerlib::TestAndInstallPackage( "hplip", "install" ) )
+ { package_changed = true;
+ }
+ else
+ { // We are here either when the user has rejected to install hplip
+ // or if the installation of hplip has actually failed.
+ // Installation of hplip may have failed because
+ // an old hplip-hpijs may have been still installed
+ // (hplip requires the exact matching hplip-hpijs version).
+ // Therefore here a special error handling if hplip-hpijs is installed.
+ // This special error handling would be also done when hplip-hpijs is installed
+ // and the user has rejected to install hplip but in this very special case
+ // the user just needs to continue to reject all the stuff to get out
+ // without any changes in his installed packages.
+ // Unfortunately even PackageSystem::CheckAndInstallPackagesInteractive(["hplip"])
+ // does neither show a useful error message why an installation failed to the user
+ // (the SATResolver reports the problems and solutions perfectly in y2log)
+ // nor does it let the user do any useful error handling
+ // (it does not let the user choose one of the solutions of the SATResolver)
+ // except a blind and trivial "continue" or "cancel".
+ // It even exits with true if the user decided to "continue" in case of an error
+ // so that the caller cannot distinguish easily if it was a successful installation
+ // or if the installation failed but the user decided to "continue" nevertheless.
+ // Therefore PackageSystem::CheckAndInstallPackagesInteractive(["hplip"])
+ // is totally useless for me here and therefore I implement some
+ // best guess and best effort error handling here on my own.
+ if( Printerlib::TestAndInstallPackage( "hplip-hpijs", "installed" ) )
+ { if( Printerlib::TestAndInstallPackage( "hplip-hpijs", "remove" ) )
+ { // Try again to install hplip only if hplip-hpijs was actually removed.
+ if( Printerlib::TestAndInstallPackage( "hplip", "install" ) )
+ { package_changed = true;
+ }
+ else
+ { // Very special error handling:
+ // For whatever reason hpijs-standalone becomes installed on openSUSE 11.0
+ // by whatever magic automatically after hplip-hpijs was removed
+ // but hpijs-standalone conflicts with hplip-hpijs which is required by hplip.
+ if( Printerlib::TestAndInstallPackage( "hpijs-standalone", "installed" ) )
+ { // It can lead to an almost endless sequence of further problems
+ // when hpijs-standalone is removed by the package management system
+ // and because we do want to get rid of it, it is removed by plain rpm:
+ Printerlib::ExecuteBashCommand( "rpm -e --nodeps hpijs-standalone" );
+ if( ! Printerlib::TestAndInstallPackage( "hpijs-standalone", "installed" ) )
+ { // Try again to install hplip only if hpijs-standalone was actually removed.
+ if( Printerlib::TestAndInstallPackage( "hplip", "install" ) )
+ { package_changed = true;
+ }
}
}
}
@@ -440,7 +458,6 @@
continue;
}
Wizard::EnableBackButton();
- Wizard::EnableAbortButton();
Wizard::EnableNextButton();
y2milestone( "leaving AddDriverDialog" );
return ret;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.32/src/driveroptions.ycp new/yast2-printer-2.17.34/src/driveroptions.ycp
--- old/yast2-printer-2.17.32/src/driveroptions.ycp 2008-11-04 14:14:27.000000000 +0100
+++ new/yast2-printer-2.17.34/src/driveroptions.ycp 2008-11-06 16:13:07.000000000 +0100
@@ -45,6 +45,7 @@
*/
any DriverOptionsDialog()
{ string name = Printer::queues[Printer::selected_queues_index,"name"]:"";
+ y2milestone( "entering DriverOptionsDialog for queue '%1'", 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 );
@@ -63,16 +64,26 @@
// because no value is initially selected:
Printer::DriverOptionItems( "", "" )
);
+ // According to http://en.opensuse.org/YaST/Style_Guide#Single_Configuration.2FOverview.2FEd...
+ // there is no longer a "abort" functionality which exits the whole module.
+ // Instead this button is now named "Cancel" and its functionality is
+ // to go back to the Overview dialog (i.e. what the "back" button would do)
+ // because it reads "Cancel - Closes the window and returns to the overview."
+ // In this case the "overview" is not the actual Overview dialog but the dialog
+ // from which this DriverOptionsDialog was called i.e. BasicModifyDialog.
+ // Therefore the button with the "abort" functionality is not shown at all
+ // and the button with the "back" functionality is named "Cancel".
+ // According to http://en.opensuse.org/YaST/Style_Guide#Single_Configuration.2FOverview.2FEd...
+ // the "finish" button in a single (step) configuration dialog must now be named "OK".
Wizard::SetContentsButtons( caption,
contents,
HELPS["driver_options_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()
+ // Set a new label for the "back" button, see the comment above:
+ Label::CancelButton(),
+ // Set a new label for the "next" button, see the comment above:
+ Label::OKButton()
);
+ Wizard::HideAbortButton();
any ret = nil;
while(true)
{ ret = UI::UserInput();
@@ -105,7 +116,6 @@
);
if( something_has_changed )
{ Wizard::DisableBackButton();
- Wizard::DisableAbortButton();
Wizard::DisableNextButton();
if( ! Printerlib::ExecuteBashCommand( commandline ) )
{ Popup::Error( // Message of a Popup::Error
@@ -116,7 +126,6 @@
);
}
Wizard::EnableBackButton();
- Wizard::EnableAbortButton();
Wizard::EnableNextButton();
}
// Exit this dialog in any case:
@@ -159,6 +168,7 @@
y2milestone( "Ignoring unexpected returncode in DriverOptionsDialog: %1", ret );
continue;
}
+ y2milestone( "leaving DriverOptionsDialog" );
return ret;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.32/src/overview.ycp new/yast2-printer-2.17.34/src/overview.ycp
--- old/yast2-printer-2.17.32/src/overview.ycp 2008-11-05 09:26:41.000000000 +0100
+++ new/yast2-printer-2.17.34/src/overview.ycp 2008-11-06 16:38:30.000000000 +0100
@@ -33,12 +33,8 @@
import "Label";
import "Popup";
-import "Wizard";
-import "Wizard_hw";
-import "Confirm";
import "Printerlib";
import "Printer";
-import "Service";
include "printer/helps.ycp";
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.32/src/Printer.ycp new/yast2-printer-2.17.34/src/Printer.ycp
--- old/yast2-printer-2.17.32/src/Printer.ycp 2008-11-04 14:14:27.000000000 +0100
+++ new/yast2-printer-2.17.34/src/Printer.ycp 2008-11-06 16:51:39.000000000 +0100
@@ -37,7 +37,6 @@
import "Progress";
import "Summary";
-import "Message";
import "Popup";
import "Printerlib";
import "Mode";
@@ -306,7 +305,7 @@
"",
// Busy message:
// Body of a Popup::ShowFeedback:
- _("Retrieving printer driver information...")
+ _("Retrieving printer driver information...\n(this could take more than a minute)")
);
}
if( ! Printerlib::ExecuteBashCommand( create_database_commandline ) )
@@ -1211,6 +1210,10 @@
// It will be replaced by real content, when a connection is selected.
driver_string = _("Select a connection, then matching drivers show up here.");
driver_items = [ `item( `id( -1 ), driver_string ) ];
+ // Invalidate selected_ppds_index to be on the safe side.
+ // Otherwise it is possible to set up a queue with a previously selected driver
+ // even if the current dialog does not show it.
+ selected_ppds_index = -1;
}
return driver_items;
}
@@ -1255,8 +1258,12 @@
if( size( driver_items ) == 0 )
{ // If the driver_items list is empty (e.g. because of a too restrictive driver_filter_string),
// show a meaningful text as fallback entry.
- driver_string = _("No matching driver found. Try 'More Drivers' or 'All Drivers'.");
+ driver_string = _("No matching driver found.");
driver_items = [ `item( `id( -1 ), driver_string ) ];
+ // Invalidate selected_ppds_index to be on the safe side.
+ // Otherwise it is possible to set up a queue with a previously selected driver
+ // even if the current dialog does not show it.
+ selected_ppds_index = -1;
Popup::ClearFeedback();
return driver_items;
}
@@ -1314,9 +1321,10 @@
y2milestone( "Already preselected driver: '%1'", driver_string );
}
else
- { // Invalidate selected_ppds_index to be safe:
+ { // Invalidate selected_ppds_index to be on the safe side.
+ // Otherwise it is possible to set up a queue with a previously selected driver
+ // even if the current dialog does not show it.
selected_ppds_index = -1;
- y2milestone( "No driver preselected." );
}
// Sort the driver_items list.
// There are two kind of sorting the driver_items list.
@@ -1582,7 +1590,7 @@
sorted_driver_items[0] = `item( `id( selected_ppds_index ), driver_string, true );
y2milestone( "Preselected driver: '%1'", driver_string );
}
- // The specially sorted_driver_items list has a maximum of 10 entries which is o.k. for the log:
+ // The specially sorted_driver_items list has a maximum of 20 entries which is o.k. for the log:
y2milestone( "sorted_driver_items: %1", sorted_driver_items );
Popup::ClearFeedback();
return sorted_driver_items;
@@ -1598,6 +1606,17 @@
}
);
Popup::ClearFeedback();
+ if( selected_ppds_index < 0 )
+ { // When no driver was preselected, prepend a dummy entry
+ // because the first entry in a SelectionBox is always preselected in the GUI
+ // (it does not help to have all items in a SelectionBox with 'false' as third argument).
+ // Do not have this dummy entry preselected (i.e. no 'true' as a third argument)
+ // because in the BasicModifyDialog the currenlty used driver is additionally prepended
+ // and then the currenlty used driver must be preselected by default because
+ // the currenlty used driver is then the very first entry in the SelectionBox.
+ sorted_driver_items = prepend( sorted_driver_items, `item( `id( -1 ), _("Select a driver.") ) );
+ y2milestone( "No driver preselected." );
+ }
return sorted_driver_items;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.32/src/readwrite.ycp new/yast2-printer-2.17.34/src/readwrite.ycp
--- old/yast2-printer-2.17.32/src/readwrite.ycp 2008-11-04 14:14:27.000000000 +0100
+++ new/yast2-printer-2.17.34/src/readwrite.ycp 2008-11-06 16:37:19.000000000 +0100
@@ -34,7 +34,6 @@
import "Label";
import "Popup";
import "Wizard";
-import "Wizard_hw";
import "Confirm";
import "Printer";
@@ -44,39 +43,73 @@
* Return a modification status
* @return true if data was modified
*/
-boolean Modified() {
- return Printer::Modified();
+boolean Modified()
+{ return Printer::Modified();
}
-boolean ReallyAbort() {
- return !Printer::Modified() || Popup::ReallyAbort(true);
+/**
+ * Ask for user confirmation if necessary before aborting.
+ * At present full transaction semantics (with roll-back) is not implemented.
+ * What is implemented is that it does not leave the system in an inconsistent state.
+ * It does one setup completely or not at all (i.e. all or nothing semantics regarding one setup.)
+ * "One setup" means the smallest amount of setup actions
+ * which lead from one consistent state to another consistent state.
+ * "Consistent state" is meant from the user's point of view
+ * (i.e. set up one print queue completely or set up printing via network completely)
+ * and not from a low-level (e.g. filesystem or kernel) point of view.
+ * If the user does malicious stuff (e.g. killing YaST)
+ * or if the user ignores warning messages then it is possible (and it is accepted)
+ * that the user can force to set up even an inconsistent state
+ * (e.g. set up share print queues but don't re-start the cupsd).
+ * At present all what is needed for one setup is committed to the system instantly.
+ * For background information and details see
+ * http://en.opensuse.org/YaST/Development/Printer_Enhancement
+ * @return true if nothing was committed or if user confirms to abort
+ */
+boolean ReallyAbort()
+{ // As roll-back is not implemented 'Popup::ReallyAbort(true)' doesn't make sense.
+ return !Printer::Modified() || Popup::ReallyAbort(false);
}
-boolean PollAbort() {
- return UI::PollInput() == `abort;
+boolean PollAbort()
+{ return UI::PollInput() == `abort;
}
/**
* Read settings dialog
* @return `abort if aborted and `next otherwise
*/
-symbol ReadDialog() {
- Wizard::RestoreHelp(HELPS["read"]:"");
- // Printer::AbortFunction = PollAbort;
- if (!Confirm::MustBeRoot()) return `abort;
- boolean ret = Printer::Read();
- return ret ? `next : `abort;
+symbol ReadDialog()
+{ // Confirm::MustBeRoot() returns 'true' when the current user is root.
+ // Otherwise the user is asked for confirmation whether he want's to continue
+ // despite the fact that the module might not work correctly.
+ if( !Confirm::MustBeRoot() ) return `abort;
+ // According to http://en.opensuse.org/YaST/Style_Guide#Single_Configuration.2FOverview.2FEd...
+ // the "abort" button in a single configuration dialog must now be named "cancel":
+ Wizard::SetAbortButton( `abort, Label::CancelButton() );
+ // No "back" or "next" button at all makes any sense here
+ // because there is no dialog where to go "back"
+ // and the "next" dialog (i.e. the Overview dialog) is launced automatically
+ Wizard::HideBackButton();
+ Wizard::HideNextButton();
+ Wizard::RestoreHelp(HELPS["read"]:"");
+ // Printer::AbortFunction = PollAbort;
+ boolean ret = Printer::Read();
+ return ret ? `next : `abort;
}
/**
* Write settings dialog
* @return `abort if aborted and `next otherwise
*/
-symbol WriteDialog() {
- Wizard::RestoreHelp(HELPS["write"]:"");
- // Printer::AbortFunction = PollAbort;
- boolean ret = Printer::Write();
- return ret ? `next : `abort;
+symbol WriteDialog()
+{ // No "abort" or "back" or "next" button at all makes any sense here:
+ Wizard::HideAbortButton();
+ Wizard::HideBackButton();
+ Wizard::HideNextButton();
+ Wizard::RestoreHelp(HELPS["write"]:"");
+ boolean ret = Printer::Write();
+ return ret ? `next : `abort;
}
/* EOF */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.32/src/sharing.ycp new/yast2-printer-2.17.34/src/sharing.ycp
--- old/yast2-printer-2.17.32/src/sharing.ycp 2008-11-05 11:30:30.000000000 +0100
+++ new/yast2-printer-2.17.34/src/sharing.ycp 2008-11-06 12:44:45.000000000 +0100
@@ -106,7 +106,7 @@
( `id(`interface_table_label),
// A caption for a table to allow remote access to local print queues
// via network interfaces specified in the table below:
- _("Optionally via network interfaces specified below")
+ _("Via network interfaces specified below")
)
),
`HBox
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-printer-2.17.32/VERSION new/yast2-printer-2.17.34/VERSION
--- old/yast2-printer-2.17.32/VERSION 2008-11-05 11:30:37.000000000 +0100
+++ new/yast2-printer-2.17.34/VERSION 2008-11-06 17:36:08.000000000 +0100
@@ -1 +1 @@
-2.17.32
+2.17.34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org