[yast-commit] r62503 - in /trunk/printer: VERSION data/testprint.2pages.ps data/testprint.ps package/yast2-printer.changes src/Printer.ycp src/Printerlib.ycp
Author: jsmeix Date: Thu Sep 23 17:53:45 2010 New Revision: 62503 URL: http://svn.opensuse.org/viewcvs/yast?rev=62503&view=rev Log: - Replaced Popup::TimedMessage while "Updating configuration files" with a nicer looking animated ProgressBar widget (see Novell/openSUSE Bugzilla bnc#640547). - Changed the numbers for DownloadProgress to multiple of 1024 to get nicer looking "nnn.0 KB" texts in the Gtk UI. - Fixed some typos in texts at various places. - 2.20.2 Modified: trunk/printer/VERSION trunk/printer/data/testprint.2pages.ps trunk/printer/data/testprint.ps trunk/printer/package/yast2-printer.changes trunk/printer/src/Printer.ycp trunk/printer/src/Printerlib.ycp Modified: trunk/printer/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/VERSION?rev=62503&r1=62502&r2=62503&view=diff ============================================================================== --- trunk/printer/VERSION (original) +++ trunk/printer/VERSION Thu Sep 23 17:53:45 2010 @@ -1 +1 @@ -2.20.1 +2.20.2 Modified: trunk/printer/data/testprint.2pages.ps URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/data/testprint.2pages.ps?rev=62503&r1=62502&r2=62503&view=diff ============================================================================== --- trunk/printer/data/testprint.2pages.ps (original) +++ trunk/printer/data/testprint.2pages.ps Thu Sep 23 17:53:45 2010 @@ -5,7 +5,7 @@ %%DocumentData: Clean7Bit %%DocumentSuppliedResources: procset testprint/1.3 %%DocumentNeededResources: font Helvetica Helvetica-Bold Times-Roman -%%Creator: Michael Sweet, Apple Inc. +%%Creator: Michael Sweet, Apple Inc. - adapted by openSUSE/Novell %%CreationDate: D:20090113092400+0800 %%Title: Test Page %%EndComments Modified: trunk/printer/data/testprint.ps URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/data/testprint.ps?rev=62503&r1=62502&r2=62503&view=diff ============================================================================== --- trunk/printer/data/testprint.ps (original) +++ trunk/printer/data/testprint.ps Thu Sep 23 17:53:45 2010 @@ -5,7 +5,7 @@ %%DocumentData: Clean7Bit %%DocumentSuppliedResources: procset testprint/1.3 %%DocumentNeededResources: font Helvetica Helvetica-Bold Times-Roman -%%Creator: Michael Sweet, Apple Inc. +%%Creator: Michael Sweet, Apple Inc. - adapted by openSUSE/Novell %%CreationDate: D:20090113092400+0800 %%Title: Test Page %%EndComments Modified: trunk/printer/package/yast2-printer.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/package/yast2-printer.changes?rev=62503&r1=62502&r2=62503&view=diff ============================================================================== --- trunk/printer/package/yast2-printer.changes (original) +++ trunk/printer/package/yast2-printer.changes Thu Sep 23 17:53:45 2010 @@ -1,4 +1,15 @@ ------------------------------------------------------------------- +Thu Sep 23 17:41:14 CEST 2010 - jsmeix@suse.de + +- Replaced Popup::TimedMessage while "Updating configuration files" + with a nicer looking animated ProgressBar widget + (see Novell/openSUSE Bugzilla bnc#640547). +- Changed the numbers for DownloadProgress to multiple of 1024 + to get nicer looking "nnn.0 KB" texts in the Gtk UI. +- Fixed some typos in texts at various places. +- 2.20.2 + +------------------------------------------------------------------- Wed Aug 18 12:20:57 CEST 2010 - jsmeix@suse.de - Added a "Use as Default" check-box below the input field for @@ -320,7 +331,7 @@ testprint.ps was added as /usr/share/YaST2/data/testprint.ps (see Novell/Suse Bugzilla bnc#520617). * Since CUPS 1.4 there are several seconds delay until cupsd - writes confug files like printers.conf which requires the + writes config files like printers.conf which requires the new function Printerlib::WaitForUpdatedConfigFiles (see Novell/Suse Bugzilla bnc#520612). * At least in CUPS 1.4.rc1 a 'sleep 1' workaround is required @@ -332,7 +343,7 @@ ------------------------------------------------------------------- Wed Jul 8 12:23:59 CEST 2009 - ug@suse.de -- redone RNC file +- redone printer.rnc file ------------------------------------------------------------------- Tue Jun 2 16:35:57 CEST 2009 - jsmeix@suse.de Modified: trunk/printer/src/Printer.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/Printer.ycp?rev=62503&r1=62502&r2=62503&view=diff ============================================================================== --- trunk/printer/src/Printer.ycp (original) +++ trunk/printer/src/Printer.ycp Thu Sep 23 17:53:45 2010 @@ -387,8 +387,10 @@ `DownloadProgress( // Header of a DownloadProgress indicator: _("Retrieving printer driver information..."), create_database_progress_filename, - // On my openSUSE 11.0 the size is about 80000 bytes: - 90000 + // On my openSUSE 11.1 the size is about 90000 bytes. + // The number 102400 results exactly "100.0 KB" in the + // YaST Gtk user inteface for a DownloadProgress: + 102400 ) ) ) @@ -508,8 +510,10 @@ autodetect_printers_progress_filename, // The progress file can grow up to about 3600 bytes // if the MAXIMUM_WAIT="60" in tools/autodetect_printers - // is really needed: - 3700 + // is really needed. + // The number 4096 results exactly "4.0 KB" in the + // YaST Gtk user inteface for a DownloadProgress: + 4096 ) ) ) Modified: trunk/printer/src/Printerlib.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/printer/src/Printerlib.ycp?rev=62503&r1=62502&r2=62503&view=diff ============================================================================== --- trunk/printer/src/Printerlib.ycp (original) +++ trunk/printer/src/Printerlib.ycp Thu Sep 23 17:53:45 2010 @@ -574,7 +574,7 @@ // Use fallback cupsd_conf_dirty_clean_interval value when the command above failed. y2milestone( "Waiting DirtyCleanInterval='%1'+1 seconds for updated config files.", dirty_clean_interval ); if( dirty_clean_interval < 1 ) - { // Even in case if "immediate" update of the config files + { // Even in case of "immediate" update of the config files // be on the safe side and sleep one second but without user notification: sleep( 1000 ); return true; @@ -585,19 +585,40 @@ // Return true if the user did not interrupt the waiting for updated config files // but return false if the user interrupted the waiting for updated config files. // To be on the safe side sleep one second longer than the dirty_clean_interval. - // Only Popup::TimedAnyQuestion and Popup::TimedOKCancel return a non-void value - // but neither of them return false if the user interrupted the waiting - // because both of them return true if the user interrupted via the 'Yes' or 'OK' button - // so that both are useless to determine if the user interrupted the waiting - // and therefore I return depending on calculating the waiting time directly - // by calling time() which returns the number of seconds since 1.1.1970: - integer time_before = time(); - Popup::TimedMessage( // Message of a Popup::TimedMessage: - popupheader + "\n\n" + _("Updating configuration files..."), - dirty_clean_interval + 1 - ); - integer waiting_time = time() - time_before; - if( waiting_time < dirty_clean_interval ) + integer max_waiting_time = dirty_clean_interval + 1; + integer waited_time = 0; + UI::OpenDialog + ( `VBox + ( `Label( popupheader ), + `ProgressBar + ( `id( "wait_for_updated_config_files_progress_bar" ), + // Label for a ProgressBar while waiting for updated config files: + _("Updating configuration files..."), + max_waiting_time, + waited_time + ), + `Right + ( `PushButton + ( `id( "skip_waiting_for_updated_config_files" ), + // Label for a PushButton to skip waiting for updated config files: + _("&Skip waiting") + ) + ) + ) + ); + while( waited_time < max_waiting_time ) + { // Wait one second for user input: + string user_input = (string)UI::TimeoutUserInput(1000); + // Break waiting loop if the user wants to skip waiting for updated config files: + if( "skip_waiting_for_updated_config_files" == user_input ) + { break; + } + // Otherwise update the progress bar and loop to wait one more second for user input: + waited_time = waited_time + 1; + UI::ChangeWidget( `id("wait_for_updated_config_files_progress_bar"), `Value, waited_time ); + } + UI::CloseDialog(); + if( waited_time < dirty_clean_interval ) { // To avoid needless error popups be on the safe side and return false only // when the waiting_time is strictly less than the dirty_clean_interval. // Don't show a warning popup here. -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
jsmeix@svn2.opensuse.org