Author: jsmeix Date: Thu Sep 18 11:08:27 2008 New Revision: 51262 URL: http://svn.opensuse.org/viewcvs/yast?rev=51262&view=rev Log: Implemented two more CheckBoxes to set the queue state (accept/reject jobs and enable/disable printing) to basicmodify.ycp. Changed dialog layout in basicmodify.ycp, basicadd.ycp, and overview.ycp so that it looks nicer in ncurses mode. Changed help texts in helps.ycp for the "main translation round for SLE11". Modified: trunk/printer/src/basicadd.ycp trunk/printer/src/basicmodify.ycp trunk/printer/src/helps.ycp trunk/printer/src/overview.ycp trunk/printer/src/sharing.ycp Modified: trunk/printer/src/basicadd.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/basicadd.ycp?rev=51262&r1=51261&r2=51262&view=diff ============================================================================== --- trunk/printer/src/basicadd.ycp (original) +++ trunk/printer/src/basicadd.ycp Thu Sep 18 11:08:27 2008 @@ -111,18 +111,13 @@ ), `VStretch(), `VBox - ( `Left - ( `Label - ( // Caption for a printer driver selection: - _("Assign Driver") - ) - ), - `HBox + ( `HBox ( `ReplacePoint ( `id(`driver_filter_input_replace_point), `TextEntry ( `id(`driver_filter_input), - "", + // Caption for a printer driver selection: + _("Assign &Driver"), driver_filter_input_text ) ), @@ -138,8 +133,7 @@ // Label of a PushButton to search a list for a search string // and then show the search result: _("&Show Matching Drivers") - ), - `HStretch() + ) ), `ReplacePoint ( `id(`driver_selection_replace_point), @@ -348,7 +342,8 @@ } UI::ReplaceWidget( `id(`driver_filter_input_replace_point), `TextEntry( `id(`driver_filter_input), - "", + // Caption for a printer driver selection: + _("Assign &Driver"), driver_filter_input_text ) ); @@ -398,7 +393,8 @@ } UI::ReplaceWidget( `id(`driver_filter_input_replace_point), `TextEntry( `id(`driver_filter_input), - "", + // Caption for a printer driver selection: + _("Assign &Driver"), driver_filter_input_text ) ); Modified: trunk/printer/src/basicmodify.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/basicmodify.ycp?rev=51262&r1=51261&r2=51262&view=diff ============================================================================== --- trunk/printer/src/basicmodify.ycp (original) +++ trunk/printer/src/basicmodify.ycp Thu Sep 18 11:08:27 2008 @@ -295,17 +295,13 @@ ), `VStretch(), `VBox - ( `Left - ( `Label( // Caption for a printer driver selection: - _("Driver") - ) - ), - `HBox + ( `HBox ( `ReplacePoint ( `id(`driver_filter_input_replace_point), `TextEntry ( `id(`driver_filter_input), - "", + // Caption for a printer driver selection: + _("Driver"), driver_filter_input_text ) ), @@ -321,8 +317,7 @@ // Label of a PushButton to search a list for a search string // and then show the search result: _("&Show Matching Drivers") - ), - `HStretch() + ) ), `ReplacePoint ( `id(`paper_choice_and_driver_options_replace_point), @@ -354,40 +349,47 @@ ) ), `VStretch(), - `HBox - ( `TextEntry - ( `id(`description_input), - `opt(`hstretch), - // Label of a TextEntry for a short printer driver description (only one line): - _("Descri&ption"), - description - ), - `HSpacing( 1 ), - `TextEntry - ( `id(`location_input), - `opt(`hstretch), - // Label of a TextEntry for printer location string: - _("&Location"), - location - ), - `HSpacing( 1 ), - `CheckBox - ( `id(`set_as_default_checkbox), - // CheckBox to set a local print queues to be the default queue: - _("Is &Default"), - is_default - ), - `CheckBox - ( `id(`set_accept_jobs_checkbox), - // CheckBox to set a local print queues to be the default queue: - _("Accept &Jobs"), - accepting_jobs + `VBox + ( `HBox + ( `TextEntry + ( `id(`description_input), + `opt(`hstretch), + // Label of a TextEntry for a short printer driver description (only one line): + _("Descri&ption"), + description + ), + `HSpacing( 2 ), + `TextEntry + ( `id(`location_input), + `opt(`hstretch), + // Label of a TextEntry for printer location string: + _("&Location"), + location + ) ), - `CheckBox - ( `id(`set_enable_printing_checkbox), - // CheckBox to set a local print queues to be the default queue: - _("Enable &Printing"), - printing_enabled + `Left + ( `HBox + ( `CheckBox + ( `id(`default_queue_checkbox), + // CheckBox to set a local print queue to be the default queue: + _("&Default Printer"), + is_default + ), + `HSpacing( 2 ), + `CheckBox + ( `id(`accept_jobs_checkbox), + // CheckBox to set a local print queue to accept print jobs: + _("Accept Print &Jobs"), + accepting_jobs + ), + `HSpacing( 2 ), + `CheckBox + ( `id(`enable_printing_checkbox), + // CheckBox to enable printing for a local print queue: + _("&Enable Printing"), + printing_enabled + ) + ) ) ) ); @@ -453,7 +455,7 @@ { commandline = commandline + " -L '" + location_input + "'"; something_has_changed = true; } - boolean is_default_input = (boolean)UI::QueryWidget( `id(`set_as_default_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 ) @@ -465,12 +467,35 @@ { // Currently it is not possible to unset from a queue to be the default queue, // see http://www.cups.org/newsgroups.php?gcups.general+v:31874 // All one can do is set up a dummy queue, make it the default, and remove it. + // To be on the safe side the dummy queue neither accepts jobs + // nor is printing enabled (no '-E' as last lpadmin option) + // nor is it announced ("shared") to whatever BrowseAddress in cupsd.conf. // Here I assume blindly that no queue "yast2unsetdefaultqueue" exists. commandline = commandline + " ; /usr/sbin/lpadmin -h localhost -p yast2unsetdefaultqueue -v file:/dev/null -o printer-is-shared=false" + " ; /usr/sbin/lpadmin -h localhost -d yast2unsetdefaultqueue" + " ; /usr/sbin/lpadmin -h localhost -x yast2unsetdefaultqueue"; } } + boolean accepting_jobs_input = (boolean)UI::QueryWidget( `id(`accept_jobs_checkbox), `Value); + if( accepting_jobs_input != accepting_jobs ) + { something_has_changed = true; + if( accepting_jobs_input ) + { commandline = commandline + " ; /usr/sbin/accept -h localhost '" + name + "'"; + } + else + { commandline = commandline + " ; /usr/sbin/reject -h localhost '" + name + "'"; + } + } + boolean printing_enabled_input = (boolean)UI::QueryWidget( `id(`enable_printing_checkbox), `Value); + if( printing_enabled_input != printing_enabled ) + { something_has_changed = true; + if( printing_enabled_input ) + { commandline = commandline + " ; /usr/sbin/cupsenable -h localhost '" + name + "'"; + } + else + { commandline = commandline + " ; /usr/sbin/cupsdisable -h localhost '" + name + "'"; + } + } if( something_has_changed ) { Wizard::DisableBackButton(); Wizard::DisableAbortButton(); @@ -640,7 +665,8 @@ } UI::ReplaceWidget( `id(`driver_filter_input_replace_point), `TextEntry( `id(`driver_filter_input), - "", + // Caption for a printer driver selection: + _("Driver"), driver_filter_input_text ) ); @@ -757,7 +783,8 @@ } UI::ReplaceWidget( `id(`driver_filter_input_replace_point), `TextEntry( `id(`driver_filter_input), - "", + // Caption for a printer driver selection: + _("Driver"), driver_filter_input_text ) ); Modified: trunk/printer/src/helps.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/helps.ycp?rev=51262&r1=51261&r2=51262&view=diff ============================================================================== --- trunk/printer/src/helps.ycp (original) +++ trunk/printer/src/helps.ycp Thu Sep 18 11:08:27 2008 @@ -52,49 +52,81 @@ </p>"), "overview" : -// Overview dialog help 1/5: +// Overview dialog help 1/7: _("<p> <b><big>Print Queue Overview</big></b><br> A printer device is not used directly but via a print queue.<br> When various application programs submit print jobs simultaneously, -the jobs queue up and are sent one after the other to the printer device. +the jobs queue up and are sent one after the other to the printer device.<br> +It is possible to have several different print queues for the same printer device. +For example a second queue with a monochrome-only driver for a color device +or a PostScript queue and a queue with a PCL driver for a PostScript+PCL printer. </p>") + -// Overview dialog help 2/5: +// Overview dialog help 2/7: +_("<p> +<b><big>Using Remote Queues:</big></b><br> +Remote queues exist on other hosts in the network +and therefore they cannot be changed on this host.<br> +The remote queues which are listed here are known on this host +and usually they can be used directly by application programs +so that there is no need to set up a local queue for a printer +which is already available via a remote queue.<br> +</p>") + +// Overview dialog help 3/7: _("<p> <b><big>Configure a printer:</big></b><br> Press <b>Add</b> to set up a new queue for a printer device. </p>") + -// Overview dialog help 3/5: +// Overview dialog help 4/7: _("<p> <b><big>Change the settings for a queue:</big></b><br> -Select the queue and press <b>Modify</b>. +Select a local queue and press <b>Configure</b>. </p>") + -// Overview dialog help 4/5: +// Overview dialog help 5/7: _("<p> <b><big>Remove a queue:</big></b><br> -Select the queue and press <b>Delete</b>. +Select a local queue and press <b>Delete</b>. </p>") + -// Overview dialog help 5/5: +// Overview dialog help 6/7: _("<p> -<b><big>Using Remote Queues:</big></b><br> -Remote queues exist on other hosts in the network -and therefore they cannot be changed on this host.<br> -The remote queues which are listed here are known on this host -and usually they can be used directly by application programs -so that there is no need to set up a local queue for a printer -which is already available via a remote queue.<br> +<b><big>Print a test page:</big></b><br> +Select the queue and press <b>Print Test Page</b>. +</p>") + +// Overview dialog help 7/7: +_("<p> +<b><big>Refresh the list of queues:</big></b><br> +In particular after changes regarding printing via network +the available remote queues may have changed. +Usually it takes some time (up to several minutes) +until such changes become known to the local host +so that it is useful to press <b>Refresh List</b> +after some time to get an up-to-date list +of available remote queues. </p>"), "basic_add_dialog" : -// BasicAddDialog help 1/4: +// BasicAddDialog help 1/5: +_("<p> +<b><big>Set Up a New Queue for a Printer Device</big></b><br> +A printer device is not used directly but via a print queue.<br> +When various application programs submit print jobs simultaneously, +the jobs queue up and are sent one after the other to the printer device.<br> +It is possible to have several different print queues for the same printer device. +Usually several print queues are needed when several different printer drivers +should be used for the same printer device. +For example a second queue with a monochrome-only driver +to enforce black-only printout on a color device +or a PostScript queue and a queue with a PCL driver for a PostScript+PCL printer +because printing via the PCL driver is usally faster (but with less quality). +</p>") + +// BasicAddDialog help 2/5: _("<p> -<b><big>Set Up a New Queue</big></b><br> To set up a new queue:<br> Select the connection of the matching printer device,<br> find and assign a suitable printer driver, and<br> set a unique queue name. </p>") + -// BasicAddDialog help 2/4: +// BasicAddDialog help 3/5: _("<p> The <b>connection</b> determines which way data is sent to the printer device.<br> If a wrong connection is selected, no data can be sent to the device @@ -108,14 +140,14 @@ (e.g. device status via 'hp-toolbox', or scanning with a HP all-in-one device) the 'hp:/...' connection must be used. </p>") + -// BasicAddDialog help 3/4: +// BasicAddDialog help 4/5: _("<p> The <b>driver</b> determines that the right data is produced for the specific printer model.<br> If a wrong driver is assigned, wrong data is sent to the printer which results bad looking printout, chaotic printout, or no printout at all. </p>") + -// BasicAddDialog help 4/4: +// BasicAddDialog help 5/5: _("<p> Application programs do not show the actual printer device but its associated <b>queue name</b>.<br> @@ -251,7 +283,7 @@ By default CUPS uses its so called 'Browsing' mode to make printers available via network.<br> In this case remote CUPS servers must publish their printers via network -and accordingly on your host the CUPS daemon process must run +and accordingly on your host the CUPS daemon process (cupsd) must run which is listening for incomming information about published printers.<br> CUPS Browsing information is recieved via UDP port 631. </p>") + @@ -277,7 +309,7 @@ Usually CUPS (Common Unix Printing System) should be set up to use its so called 'Browsing' mode to make printers available via network.<br> In this case CUPS servers publish their local print queues via network -and accordingly on CUPS client systems the CUPS daemon process must run +and accordingly on CUPS client systems the CUPS daemon process (cupsd) must run which is listening for incomming information about published printers.<br> CUPS Browsing information is recieved via UDP port 631. </p>") + Modified: trunk/printer/src/overview.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/overview.ycp?rev=51262&r1=51261&r2=51262&view=diff ============================================================================== --- trunk/printer/src/overview.ycp (original) +++ trunk/printer/src/overview.ycp Thu Sep 18 11:08:27 2008 @@ -49,13 +49,14 @@ ( `Label( // Label for CheckBoxes to select local and/or remote print queues to be listed: _("Show") ), - `HSpacing(), + `HSpacing( 2 ), `CheckBox ( `id(`local_content_checkbox), `opt(`notify), // CheckBox to select local print queues to be listed: _("&Local") ), + `HSpacing( 2 ), `CheckBox ( `id(`remote_content_checkbox), `opt(`notify), Modified: trunk/printer/src/sharing.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/sharing.ycp?rev=51262&r1=51261&r2=51262&view=diff ============================================================================== --- trunk/printer/src/sharing.ycp (original) +++ trunk/printer/src/sharing.ycp Thu Sep 18 11:08:27 2008 @@ -110,7 +110,7 @@ map result = $[]; list<string> devices = NetworkInterfaces::List(""); UI::OpenDialog( `VBox( - `CheckBox(`id(`publish), _("Publish printers by default via "), publish), + `CheckBox(`id(`publish), _("&Publish printers by default via "), publish), // translators: combo box label for list of configured IPs `ComboBox( `id(`device), `opt( `editable ), _("Network &Devices:"), devices ), `VSpacing(), @@ -141,7 +141,7 @@ map showIPPopup(string device, boolean publish){ map result = $[]; UI::OpenDialog( `VBox( - `CheckBox(`id(`publish), _("Publish printers by default via "), publish), + `CheckBox(`id(`publish), _("&Publish printers by default via "), publish), // translators: input field label for list of configured IPs `InputField( `id(`device), _("Network &Address:"), device ), `VSpacing(), -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org