Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > 8637e30a7f017e00f0781e52a48981e6 > files > 19

vuze-4.6.0.4-1.1.mga1.src.rpm

diff -up azureus-4.5.0.0/org/gudy/azureus2/ui/swt/update/UpdateMonitor.java.no-update-manager-UpdateMonitor azureus-4.5.0.0/org/gudy/azureus2/ui/swt/update/UpdateMonitor.java
--- azureus-4.5.0.0/org/gudy/azureus2/ui/swt/update/UpdateMonitor.java.no-update-manager-UpdateMonitor	2010-07-31 01:02:28.000000000 +0300
+++ azureus-4.5.0.0/org/gudy/azureus2/ui/swt/update/UpdateMonitor.java	2010-08-06 22:32:16.000000000 +0300
@@ -100,71 +100,6 @@ public class UpdateMonitor
 	protected UpdateMonitor(AzureusCore _azureus_core) {
 		azCore = _azureus_core;
 
-		PluginInterface defPI = PluginInitializer.getDefaultInterface();
-		UpdateManager um = defPI.getUpdateManager();
-
-		um.addListener(new UpdateManagerListener() {
-			public void checkInstanceCreated(UpdateCheckInstance instance) {
-				instance.addListener(UpdateMonitor.this);
-				
-				if ( !instance.isLowNoise()){
-				
-					new updateStatusChanger(instance);
-				}
-			}
-		});
-
-		um.addVerificationListener(new UpdateManagerVerificationListener() {
-			public boolean acceptUnVerifiedUpdate(final Update update) {
-				UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
-				if (uiFunctions != null) {
-					String title = MessageText.getString(MSG_PREFIX
-							+ "accept.unverified.title");
-					String text = MessageText.getString(MSG_PREFIX
-							+ "accept.unverified.text", new String[] {
-						update.getName()
-					});
-					UIFunctionsUserPrompter prompter = uiFunctions.getUserPrompter(title, text, new String[] {
-						MessageText.getString("Button.yes"),
-						MessageText.getString("Button.no")
-					}, 1);
-					prompter.setRemember(MSG_PREFIX + "accept.unverified", false,
-							MessageText.getString("MessageBoxWindow.nomoreprompting"));
-					prompter.setAutoCloseInMS(0);
-					prompter.open(null);
-					return prompter.waitUntilClosed() == 0;
-				}
-
-				return false;
-			}
-
-			public void verificationFailed(final Update update, final Throwable cause) {
-				final String cause_str = Debug.getNestedExceptionMessage(cause);
-				UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
-				if (uiFunctions != null) {
-					String title = MessageText.getString(MSG_PREFIX
-							+ "verification.failed.title");
-					String text = MessageText.getString(MSG_PREFIX
-							+ "verification.failed.text", new String[] {
-						update.getName(),
-						cause_str
-					});
-					uiFunctions.promptUser(title, text, new String[] {
-						MessageText.getString("Button.ok")
-					}, 0, null, null, false, 0, null);
-				}
-			}
-		});
-
-
-		SimpleTimer.addPeriodicEvent("UpdateMon:autocheck",
-				COConfigurationManager.getBooleanParameter( "Beta Programme Enabled" )?AUTO_UPDATE_CHECK_PERIOD_BETA:AUTO_UPDATE_CHECK_PERIOD,
-				new TimerEventPerformer() {
-					public void perform(TimerEvent ev) {
-						performAutoCheck(false);
-					}
-				});
-
 		DelayedTask delayed_task = 
 			UtilitiesImpl.addDelayedTask(
 				"Update Check", 
@@ -384,43 +319,6 @@ public class UpdateMonitor
 	}
 	
 	protected void performAutoCheck(final boolean start_of_day) {
-		boolean check_at_start = false;
-		boolean check_periodic = false;
-		boolean bOldSWT = SWT.getVersion() < 3139;
-
-		// no update checks for java web start
-
-		if (!SystemProperties.isJavaWebStartInstance()) {
-
-			// force check when SWT is really old
-			check_at_start = COConfigurationManager.getBooleanParameter("update.start")
-					|| bOldSWT;
-			check_periodic = COConfigurationManager.getBooleanParameter("update.periodic");
-		}
-
-		// periodic -> check at start as well
-
-		check_at_start = check_at_start || check_periodic;
-
-		if ((check_at_start && start_of_day) || (check_periodic && !start_of_day)) {
-
-			performCheck(bOldSWT, true, false, null ); // this will implicitly do usage stats
-
-		} else {
-
-			new DelayedEvent("UpdateMon:wait2", 5000, new AERunnable() {
-				public void runSupport() {
-					if (start_of_day) {
-						UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
-						if (uiFunctions != null) {
-							uiFunctions.setStatusText("");
-						}
-					}
-
-					CoreUpdateChecker.doUsageStats();
-				}
-			});
-		}
 	}
 
 	public void 
@@ -430,81 +328,11 @@ public class UpdateMonitor
 		final boolean						isRecheck,
 		final UpdateCheckInstanceListener 	l ) 
 	{
-		long now = SystemTime.getCurrentTime();
-
-		if ( isRecheck ){
-			
-			if ( last_recheck_time > now || now - last_recheck_time < 23*60*60*1000 ){
-				
-				if (Logger.isEnabled())
-					Logger.log(new LogEvent(LOGID,
-							"skipping recheck as consecutive recheck too soon"));
-
-				return;
-			}
-			
-			last_recheck_time = now;
-			
-		}else{
-			
-			last_recheck_time	= 0;
-		}
-		
-		if (SystemProperties.isJavaWebStartInstance()) {
-
-			// just in case we get here somehome!
-			if (Logger.isEnabled())
-				Logger.log(new LogEvent(LOGID,
-						"skipping update check as java web start"));
-
-			return;
-		}
-
-		// kill any existing update window
-
-		if (current_update_window != null && !current_update_window.isDisposed()) {
-			current_update_window.dispose();
-		}
-
-		if (current_update_instance != null) {
-
-			current_update_instance.cancel();
-		}
 
 		if ( bForce ){
 			
 			VersionCheckClient.getSingleton().clearCache();
 		}
-		
-		UIFunctions uiFunctions = UIFunctionsManager.getUIFunctions();
-		if (uiFunctions != null) {
-			// XXX What kind of format is this!?
-			uiFunctions.setStatusText("MainWindow.status.checking ...");
-		}
-
-		// take this off this GUI thread in case it blocks for a while
-
-		AEThread2 t = new AEThread2("UpdateMonitor:kickoff", true) {
-			public void run() {
-				UpdateManager um = PluginInitializer.getDefaultInterface().getUpdateManager();
-
-				current_update_instance = um.createUpdateCheckInstance(bForce
-						? UpdateCheckInstance.UCI_INSTALL : UpdateCheckInstance.UCI_UPDATE,
-						"update.instance.update");
-
-				if (!automatic) {
-
-					current_update_instance.setAutomatic(false);
-				}
-
-				if (l != null) {
-					current_update_instance.addListener(l);
-				}
-				current_update_instance.start();
-			}
-		};
-
-		t.start();
 	}
 
 	public void complete( final UpdateCheckInstance instance) {