[yast-commit] r60451 - in /trunk/printer: VERSION package/yast2-printer.changes src/basicadd.ycp src/basicmodify.ycp
Author: jsmeix Date: Tue Jan 19 16:42:56 2010 New Revision: 60451 URL: http://svn.opensuse.org/viewcvs/yast?rev=60451&view=rev Log: - More meaningful wording in BasicAdd and BasicModify dialogs. - 2.19.3 Modified: trunk/printer/VERSION trunk/printer/package/yast2-printer.changes trunk/printer/src/basicadd.ycp trunk/printer/src/basicmodify.ycp Modified: trunk/printer/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/VERSION?rev=60451&r1=60450&r2=60451&view=diff ============================================================================== --- trunk/printer/VERSION (original) +++ trunk/printer/VERSION Tue Jan 19 16:42:56 2010 @@ -1 +1 @@ -2.19.2 +2.19.3 Modified: trunk/printer/package/yast2-printer.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/package/yast2-printer.changes?rev=60451&r1=60450&r2=60451&view=diff ============================================================================== --- trunk/printer/package/yast2-printer.changes (original) +++ trunk/printer/package/yast2-printer.changes Tue Jan 19 16:42:56 2010 @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 19 16:21:03 CET 2010 - jsmeix@suse.de + +- More meaningful wording in BasicAdd and BasicModify dialogs. +- 2.19.3 + ------------------------------------------------------------------ Wed Jan 13 18:56:03 CET 2010 - kmachalkova@suse.cz Modified: trunk/printer/src/basicadd.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/basicadd.ycp?rev=60451&r1=60450&r2=60451&view=diff ============================================================================== --- trunk/printer/src/basicadd.ycp (original) +++ trunk/printer/src/basicadd.ycp Tue Jan 19 16:42:56 2010 @@ -45,6 +45,7 @@ */ any BasicAddDialog() { y2milestone( "entering BasicAddDialog" ); + string any_model_driver_filter_input_text = _("any model"); string non_matching_fallback_driver_filter_string = "qqqqqqqqqq"; // Caption for the "Add Printer" dialog (BasicAddDialog): string caption = _("Add New Printer Configuration"); @@ -81,14 +82,15 @@ ( `HBox ( `Label ( // Caption for a Table with a list of printer connections: - _("Determine Connection") + _("Specify the Connection") ), `HStretch(), `PushButton ( `id(`more_connections), - // Label of a PushButton to show more available printer connections + // Label of a PushButton to restart printer autodetection + // to show more available printer connections // in the Table with a list of printer connections: - _("&More Connections") + _("&Detect More") ), `PushButton ( `id(`connection_wizard), @@ -128,7 +130,7 @@ ( `Left ( `Label ( // Caption for a printer driver selection: - _("Assign Driver") + _("Find and Assign a Driver") ) ), `HBox @@ -143,7 +145,7 @@ `opt(`default), // Label of a PushButton to search a list for a search string // and then show the search result: - _("&Search") + _("&Search for") ), `ReplacePoint ( `id(`driver_filter_input_replace_point), @@ -152,19 +154,24 @@ `opt(`hstretch), // No InputField header because there is the "Caption for a printer driver selection": "", - driver_filter_input_text + // Make it lowercase to make it more obvious that this is a search string + // which the user could change as needed and not a final fixed model name. + // Many users do not understand that the model name which is preset here + // (i.e. initially for this dialog and when the user selected a connection) + // as search string can be changed by the user as needed to find drivers. + tolower( driver_filter_input_text ) ) ), `PushButton ( `id(`more_drivers), - // Label of a PushButton to show more available printer drivers: - _("More &Drivers") + // Label of a PushButton to find and show more available printer drivers: + _("&Find More") ), `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") + _("&Install Driver") ) ), `ReplacePoint @@ -211,7 +218,7 @@ // Avoid that it becomes squeezed to only a few characters in text mode: `opt(`hstretch), // Header of a TextEntry to enter the queue name: - _("Set &Name"), + _("Set Arbitrary &Name"), queue_name_proposal ) ), @@ -266,8 +273,15 @@ } UI::FakeUserInput( `connection_selection ); any user_input = nil; - while(true) - { user_input = UI::UserInput(); + while( true ) + { // The [Search for] button must be the default + // (it is activated when the user pressed the Enter key) + // because when the user has clicked into TextEntry to enter something + // it is normal to finish entering by pressing the Enter key + // but if the Enter key was linked to 'Next' or 'Back', + // the user would get the wrong action. + UI::SetFocus( `apply_driver_filter ); + user_input = UI::UserInput(); if( `abort == user_input || `cancel == user_input || `back == user_input ) break; if( `next == user_input ) { if( Printer::selected_connections_index < 0 @@ -449,7 +463,12 @@ ( `id(`driver_filter_input), `opt(`hstretch), // No InputField header because there is the "Caption for a printer driver selection": "", - driver_filter_input_text + // Make it lowercase to make it more obvious that this is a search string + // which the user could change as needed and not a final fixed model name. + // Many users do not understand that the model name which is preset here + // (i.e. initially for this dialog and when the user selected a connection) + // as search string can be changed by the user as needed to find drivers. + tolower( driver_filter_input_text ) ) ); UI::ReplaceWidget( `id(`driver_selection_replace_point), @@ -469,7 +488,7 @@ // Avoid that it becomes squeezed to only a few characters in text mode: `opt(`hstretch), // Header of a TextEntry to enter the queue name: - _("Set &Name"), + _("Set Arbitrary &Name"), queue_name_proposal ) ); @@ -494,9 +513,12 @@ if( `apply_driver_filter == user_input ) { driver_filter_input_text = (string)UI::QueryWidget( `id(`driver_filter_input), `Value ); y2milestone( "Drivers for '%1'", driver_filter_input_text ); + if( any_model_driver_filter_input_text == driver_filter_input_text ) + { driver_filter_input_text = ""; + } driver_filter_string = Printer::DeriveDriverFilterString( driver_filter_input_text ); if( "" == driver_filter_string ) - { driver_filter_input_text = _("any model"); + { driver_filter_input_text = any_model_driver_filter_input_text; } UI::ReplaceWidget( `id(`driver_filter_input_replace_point), `InputField @@ -535,6 +557,7 @@ y2milestone( "More drivers for '%1'", driver_filter_input_text ); if( "" != driver_filter_input_text && "unknown" != tolower( driver_filter_input_text ) + && any_model_driver_filter_input_text != driver_filter_input_text && non_matching_fallback_driver_filter_string != driver_filter_string ) { string manufacturer_and_model_number = Printer::DeriveModelName( driver_filter_input_text, 2 ); @@ -624,7 +647,7 @@ `opt(`hstretch), // No InputField header because there is the "Caption for a printer driver selection": "", - _("any model") + any_model_driver_filter_input_text ) ); driver_items = Printer::DriverItems( "", true ); Modified: trunk/printer/src/basicmodify.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/basicmodify.ycp?rev=60451&r1=60450&r2=60451&view=diff ============================================================================== --- trunk/printer/src/basicmodify.ycp (original) +++ trunk/printer/src/basicmodify.ycp Tue Jan 19 16:42:56 2010 @@ -45,6 +45,7 @@ */ any BasicModifyDialog() { y2milestone( "entering BasicModifyDialog for queue '%1'", Printer::queues[Printer::selected_queues_index]:$[] ); + string any_model_driver_filter_input_text = _("any model"); string non_matching_fallback_driver_filter_string = "qqqqqqqqqq"; string commandline = ""; string name = Printer::queues[Printer::selected_queues_index,"name"]:""; @@ -282,9 +283,10 @@ `HStretch(), `PushButton ( `id(`more_connections), - // Label of a PushButton to show more available printer connections + // Label of a PushButton to restart printer autodetection + // to show more available printer connections // in the Table with a list of printer connections: - _("&More Connections") + _("&Detect More") ), `PushButton ( `id(`connection_wizard), @@ -346,7 +348,7 @@ `opt(`default), // Label of a PushButton to search a list for a search string // and then show the search result: - _("&Search") + _("&Search for") ), `ReplacePoint ( `id(`driver_filter_input_replace_point), @@ -355,19 +357,24 @@ `opt(`hstretch), // No InputField header because there is the "Caption for a printer driver selection": "", - driver_filter_input_text + // Make it lowercase to make it more obvious that this is a search string + // which the user could change as needed and not a final fixed model name. + // Many users do not understand that the model name which is preset here + // (i.e. initially for this dialog and when the user selected a connection) + // as search string can be changed by the user as needed to find drivers. + tolower( driver_filter_input_text ) ) ), `PushButton ( `id(`more_drivers), - // Label of a PushButton to show more available printer drivers: - _("More &Drivers") + // Label of a PushButton to find and show more available printer drivers: + _("&Find More") ), `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") + _("&Install Driver") ) ), `ReplacePoint @@ -391,7 +398,7 @@ ( `id(`description_input), `opt(`hstretch), // Label of a TextEntry for a short printer driver description (only one line): - _("Descri&ption"), + _("Description &Text"), description ), `HSpacing( 2 ), @@ -408,7 +415,7 @@ ( `CheckBox ( `id(`default_queue_checkbox), // CheckBox to set a local print queue to be the default queue: - _("&Default Printer"), + _("Default &Printer"), is_default ), `HSpacing( 2 ), @@ -463,11 +470,18 @@ // becomes usually preselected and this requires different drivers to be shown: UI::FakeUserInput( `connection_selection ); } - any ret = nil; - while(true) - { ret = UI::UserInput(); - if( ret == `abort || ret == `cancel || ret == `back ) break; - if( ret == `next ) + any user_input = nil; + while( true ) + { // The [Search for] button must be the default + // (it is activated when the user pressed the Enter key) + // because when the user has clicked into TextEntry to enter something + // it is normal to finish entering by pressing the Enter key + // but if the Enter key was linked to 'Next' or 'Back', + // the user would get the wrong action. + UI::SetFocus( `apply_driver_filter ); + user_input = UI::UserInput(); + if( `abort == user_input || `cancel == user_input || `back == user_input ) break; + if( `next == user_input ) { commandline = "/usr/sbin/lpadmin -h localhost -p '" + name + "'"; boolean something_has_changed = false; boolean set_paper_size_later = false; @@ -650,15 +664,15 @@ // Exit this dialog in any case: break; } - if( ret == `connection_wizard ) + if( `connection_wizard == user_input ) { // Exit this dialog and go to the ConnectionWizardDialog via the sequencer in wizards.ycp: break; } - if( ret == `add_driver ) + if( `add_driver == user_input ) { // Exit this dialog and go to the AddDriverDialog via the sequencer in wizards.ycp: break; } - if( ret == `driver_options ) + if( `driver_options == user_input ) { if( Printer::selected_queues_index < 0 || "" == Printer::queues[Printer::selected_queues_index,"name"]:"" || "remote" == Printer::queues[Printer::selected_queues_index,"config"]:"remote" @@ -689,7 +703,7 @@ // Exit this dialog and go to the DriverOptionsDialog via the sequencer in wizards.ycp: break; } - if( ret == `more_connections ) + if( `more_connections == user_input ) { UI::ReplaceWidget( `id(`connection_selection_replace_point), `Table( `id(`connection_selection), // By default there is no UserInput() @@ -727,7 +741,7 @@ UI::FakeUserInput( `connection_selection ); continue; } - if( ret == `connection_selection ) + if( `connection_selection == user_input ) { integer selected_connection_index = (integer)UI::QueryWidget( `id(`connection_selection), `CurrentItem ); if( nil == selected_connection_index ) { Popup::AnyMessage( // Header of a Popup::AnyMessage when no connection was selected: @@ -790,7 +804,12 @@ `opt(`hstretch), // No InputField header because there is the "Caption for a printer driver selection": "", - driver_filter_input_text + // Make it lowercase to make it more obvious that this is a search string + // which the user could change as needed and not a final fixed model name. + // Many users do not understand that the model name which is preset here + // (i.e. initially for this dialog and when the user selected a connection) + // as search string can be changed by the user as needed to find drivers. + tolower( driver_filter_input_text ) ) ); UI::ReplaceWidget( `id(`driver_selection_replace_point), @@ -806,7 +825,7 @@ ) ) ); - // Do the same as if ret == `driver_selection + // Do the same as if user_input == `driver_selection // but don't show a popup if nil == selected_ppd_index: integer selected_ppd_index = (integer)UI::QueryWidget( `id(`driver_selection), `CurrentItem ); if( nil == selected_ppd_index ) @@ -849,7 +868,7 @@ } continue; } - if( ret == `driver_selection ) + if( `driver_selection == user_input ) { integer selected_ppd_index = (integer)UI::QueryWidget( `id(`driver_selection), `CurrentItem ); if( nil == selected_ppd_index ) { Popup::AnyMessage( // Header of a Popup::AnyMessage when no driver was selected: @@ -911,12 +930,15 @@ } continue; } - if( ret == `apply_driver_filter ) + if( `apply_driver_filter == user_input ) { driver_filter_input_text = (string)UI::QueryWidget( `id(`driver_filter_input), `Value ); y2milestone( "Drivers for '%1'", driver_filter_input_text ); + if( any_model_driver_filter_input_text == driver_filter_input_text ) + { driver_filter_input_text = ""; + } driver_filter_string = Printer::DeriveDriverFilterString( driver_filter_input_text ); if( "" == driver_filter_string ) - { driver_filter_input_text = _("any model"); + { driver_filter_input_text = any_model_driver_filter_input_text; } UI::ReplaceWidget( `id(`driver_filter_input_replace_point), `InputField @@ -942,7 +964,7 @@ ); continue; } - if( ret == `more_drivers ) + if( `more_drivers == user_input ) { if( non_matching_fallback_driver_filter_string != driver_filter_string ) { driver_filter_string = ""; } @@ -958,6 +980,7 @@ y2milestone( "More drivers for '%1'", driver_filter_input_text ); if( "" != driver_filter_input_text && "unknown" != tolower( driver_filter_input_text ) + && any_model_driver_filter_input_text != driver_filter_input_text && non_matching_fallback_driver_filter_string != driver_filter_string ) { string manufacturer_and_model_number = Printer::DeriveModelName( driver_filter_input_text, 2 ); @@ -1047,7 +1070,7 @@ `opt(`hstretch), // No InputField header because there is the "Caption for a printer driver selection": "", - _("any model") + any_model_driver_filter_input_text ) ); driver_items = Printer::DriverItems( "", true ); @@ -1068,11 +1091,11 @@ ); continue; } - y2milestone( "Ignoring unexpected returncode in BasicModifyDialog: %1", ret ); + y2milestone( "Ignoring unexpected returncode in BasicModifyDialog: %1", user_input ); continue; } y2milestone( "leaving BasicModifyDialog" ); - return ret; + return user_input; } /* EOF */ -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
jsmeix@svn.opensuse.org