Package: cronometer / 0.9.9+dfsg-1

05_dont_check_for_updates.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Description: We don't want our users manually upgrading cronometer through its
 own check-website-for-new-versions feature.
Author: Ryan Kavanagh <ryanakca@kubuntu.org>
Forwarded: not-needed
Origin: vendor
Last-Update: 2011-10-23
Index: cronometer/src/ca/spaz/cron/CRONOMETER.java
===================================================================
--- cronometer.orig/src/ca/spaz/cron/CRONOMETER.java	2011-10-23 11:11:17.964315318 -0400
+++ cronometer/src/ca/spaz/cron/CRONOMETER.java	2011-10-23 13:48:18.615029796 -0400
@@ -454,6 +454,8 @@
       public void run() {
          ToolBox.sleep(1000);
          Datasources.initialize(this);  
+         // We never want to check for updates on Debian
+         /*
          if (UserManager.getUserManager().getCheckForUpdates()) {
             Thread t = new Thread( new Runnable() {
                public void run() {
@@ -461,7 +463,7 @@
                }
             });
             t.start();
-         }
+         }*/
       }
       
 
Index: cronometer/src/ca/spaz/cron/user/UserManager.java
===================================================================
--- cronometer.orig/src/ca/spaz/cron/user/UserManager.java	2011-10-23 11:11:17.852314758 -0400
+++ cronometer/src/ca/spaz/cron/user/UserManager.java	2011-10-23 13:48:18.643029937 -0400
@@ -373,12 +373,17 @@
    }
 
    public void setCheckForUpdates(boolean val) {
-      settings.set(CHECK_FOR_UDAPTES, val);
+       /* We don't want our users ever enabling this feature and screwing up
+        * their system. Always leave as false. */
+      settings.set(CHECK_FOR_UDAPTES, false);
       notifyUserChangeListeners();
    }
 
    public boolean getCheckForUpdates() {
-      return settings.getBoolean(CHECK_FOR_UDAPTES, true);
+       /* Never return true, we don't want users to manually upgrade cronometer
+        * unless they know what they're doing. */
+      //return settings.getBoolean(CHECK_FOR_UDAPTES, true);
+      return false;
    }
    
    public void setHideWhenMinimized(boolean state) { 
Index: cronometer/src/ca/spaz/cron/ui/SplashScreen.java
===================================================================
--- cronometer.orig/src/ca/spaz/cron/ui/SplashScreen.java	2011-10-23 08:55:24.163882800 -0400
+++ cronometer/src/ca/spaz/cron/ui/SplashScreen.java	2011-10-23 13:59:52.838472266 -0400
@@ -82,9 +82,11 @@
          //mainPanel.add("p hfill", getTaskBar());
          
          mainPanel.add("p center", getVersionLabel());
+         /* Don't check for updates in Debian
          if (System.getProperty("ca.spaz.mode", "application").equalsIgnoreCase("application")) {
             mainPanel.add("p center", getCheckForUpdatesBox());
          }
+         */
       }
       return mainPanel;
    }