summarylogtreecommitdiffstats
path: root/remove_privileged_actions.patch
blob: fd532756d537349fb81e95e4b464cad6b90ce066 (plain)
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
diff -Naur src/lazyman/MainGUI.java src.b/lazyman/MainGUI.java
--- src/lazyman/MainGUI.java	2018-03-27 14:56:29.846459000 -0400
+++ src.b/lazyman/MainGUI.java	2018-03-27 14:59:20.640513714 -0400
@@ -66,9 +66,6 @@
             leagues[i].getDateTF().setDate(Time.getPSTDate1("MMM dd, yyyy"));
             leagues[i].setFavoriteTeam(Props.getFavTeam(leagues[i].getName()));
         }
-        if (System.getProperty("os.name").toLowerCase().contains("win")) {
-            changePasswordMI.setVisible(false);
-        }
         /*else if (System.getProperty("os.name").toLowerCase().contains("mac")) {
             com.apple.eawt.Application application = com.apple.eawt.Application.getApplication();
             application.addPreferencesMenuItem();
@@ -155,12 +152,9 @@
         maximizeConsoleButton = new javax.swing.JButton();
         jMenuBar1 = new javax.swing.JMenuBar();
         jMenu1 = new javax.swing.JMenu();
-        changePasswordMI = new javax.swing.JMenuItem();
         exitMI = new javax.swing.JMenuItem();
         jMenu2 = new javax.swing.JMenu();
         preferencesMI = new javax.swing.JMenuItem();
-        jMenuItem1 = new javax.swing.JMenuItem();
-        jMenuItem2 = new javax.swing.JMenuItem();
         jMenu3 = new javax.swing.JMenu();
         guidesMI = new javax.swing.JMenuItem();
         AboutMI = new javax.swing.JMenuItem();
@@ -509,15 +503,6 @@
                 jMenu1.setMnemonic(KeyEvent.VK_F);
                 jMenu1.setText("File");
 
-                changePasswordMI.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK));
-                changePasswordMI.setText("Change Password");
-                changePasswordMI.addActionListener(new java.awt.event.ActionListener() {
-                    public void actionPerformed(java.awt.event.ActionEvent evt) {
-                        changePasswordMIActionPerformed(evt);
-                    }
-                });
-                jMenu1.add(changePasswordMI);
-
                 exitMI.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4, java.awt.event.InputEvent.ALT_MASK));
                 exitMI.setText("Exit");
                 exitMI.addActionListener(new java.awt.event.ActionListener() {
@@ -541,23 +526,6 @@
                 });
                 jMenu2.add(preferencesMI);
 
-                jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_I, java.awt.event.InputEvent.CTRL_MASK));
-                jMenuItem1.setText("Change IP");
-                jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
-                    public void actionPerformed(java.awt.event.ActionEvent evt) {
-                        jMenuItem1ActionPerformed(evt);
-                    }
-                });
-                jMenu2.add(jMenuItem1);
-
-                jMenuItem2.setText("Clear Hosts File");
-                jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
-                    public void actionPerformed(java.awt.event.ActionEvent evt) {
-                        jMenuItem2ActionPerformed(evt);
-                    }
-                });
-                jMenu2.add(jMenuItem2);
-
                 jMenuBar1.add(jMenu2);
 
                 jMenu3.setMnemonic(KeyEvent.VK_H);
@@ -703,12 +671,6 @@
         }
     }//GEN-LAST:event_preferencesMIActionPerformed
 
-    private void changePasswordMIActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_changePasswordMIActionPerformed
-        GetPasswordGUI gp = new GetPasswordGUI(this, true);
-        gp.setLocationRelativeTo(this);
-        gp.setVisible(true);
-    }//GEN-LAST:event_changePasswordMIActionPerformed
-
     private void AboutMIActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_AboutMIActionPerformed
         AboutGUI a = new AboutGUI(this, true);
         a.setLocationRelativeTo(this);
@@ -754,22 +716,6 @@
         leagues[leaguesTabbedPane.getSelectedIndex()].setSelectedGame(0);
     }//GEN-LAST:event_NHLNextDayBtnActionPerformed
 
-    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
-        CustomIP c = new CustomIP(this, true);
-        c.setLocationRelativeTo(this);
-        c.setVisible(true);
-    }//GEN-LAST:event_jMenuItem1ActionPerformed
-
-    private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem2ActionPerformed
-        EditHosts eh = new EditHosts();
-
-        if (eh.clearHosts(leagues)) {
-            MessageBox.show("Hosts file cleared from LazyMan edits.", "Hosts File Cleared", 0);
-        } else {
-            MessageBox.show("Hosts file not cleared from LazyMan edits. Please check the console area.", "Hosts Not File Cleared", 2);
-        }
-    }//GEN-LAST:event_jMenuItem2ActionPerformed
-
     private void MLBPrevDayBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MLBPrevDayBtnActionPerformed
         leagues[leaguesTabbedPane.getSelectedIndex()].setFavGameSelected(false);
         leagues[leaguesTabbedPane.getSelectedIndex()].setDate(Time.getPrevDay(leagues[leaguesTabbedPane.getSelectedIndex()].getDate()));
@@ -897,7 +843,6 @@
     private javax.swing.JTable NHLGameTable;
     private javax.swing.JButton NHLNextDayBtn;
     private javax.swing.JButton NHLPrevDayBtn;
-    private javax.swing.JMenuItem changePasswordMI;
     private javax.swing.JPopupMenu consolePM;
     private javax.swing.JPanel consolePanel;
     private javax.swing.JScrollPane consoleScrollPane;
@@ -912,8 +857,6 @@
     private javax.swing.JMenu jMenu2;
     private javax.swing.JMenu jMenu3;
     private javax.swing.JMenuBar jMenuBar1;
-    private javax.swing.JMenuItem jMenuItem1;
-    private javax.swing.JMenuItem jMenuItem2;
     private javax.swing.JTabbedPane leaguesTabbedPane;
     private javax.swing.JPanel mainPanel;
     private javax.swing.JButton maximizeConsoleButton;
@@ -1456,57 +1399,13 @@
                 }
             } else {
                 if (curMajor > major || (curMajor == major && curMinor > minor) || (curMajor == major && curMinor >= minor && curPatch > patch) || (curMajor == major && curMinor >= minor && curPatch >= patch && curBuild > build)) {
-                    if (MessageBox.ask("New stable update available!\nWould you like to update", "New Update!") == MessageBox.yesOption()) {
-                        SwingWorker<Void, Void> u = updating();
-                        u.execute();
-                        if (AutoUpdate.download(version)) {
-                            if (AutoUpdate.unZipIt()) {
-                                String loc;
-
-                                if (!System.getProperty("os.name").toLowerCase().contains("linux")) {
-                                    loc = Paths.get(".").toAbsolutePath().normalize().toString() + System.getProperty("file.separator");
-                                    if (System.getProperty("os.name").toLowerCase().contains("win")) {
-                                        loc += "LazyMan.exe";
-                                    } else {
-                                        loc += "LazyMan.jar";
-                                    }
-                                } else {
-                                    loc = new java.io.File(Props.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getParent() + System.getProperty("file.separator") + "LazyMan.jar";
-                                }
-                                Runtime.getRuntime().exec("java -jar " + loc);
-                                System.exit(0);
-                            }
-                        }
-                        MessageBox.show("Could not automatically update. Please manually update.", "Could not automatically update", 2);
-                    }
+                    MessageBox.show("New update available. Please manually update", version, build);
                 } else {
                     version = Web.getContent("https://raw.githubusercontent.com/StevensNJD4/LazyMan/master/VERSIONBETA").replace(" BETA", "").trim();
                     String[] curVerB = version.split("\\.");
                     int curMajorB = Integer.parseInt(curVerB[0]), curMinorB = Integer.parseInt(curVerB[1]), curPatchB = Integer.parseInt(curVerB[2]), curBuildB = Integer.parseInt(curVerB[3]);
                     if (curMajorB > major || (curMajorB == major && curMinorB > minor) || (curMajorB == major && curMinorB >= minor && curPatchB > patch) || (curMajorB == major && curMinorB >= minor && curPatchB >= patch && curBuildB > build)) {
-                        if (MessageBox.ask("New beta update available!\nWould you like to update?", "New Update!") == MessageBox.yesOption()) {
-                            SwingWorker<Void, Void> u = updating();
-                            u.execute();
-                            if (AutoUpdate.download(version)) {
-                                if (AutoUpdate.unZipIt()) {
-                                    String loc;
-
-                                    if (!System.getProperty("os.name").toLowerCase().contains("linux")) {
-                                        loc = Paths.get(".").toAbsolutePath().normalize().toString() + System.getProperty("file.separator");
-                                        if (System.getProperty("os.name").toLowerCase().contains("win")) {
-                                            loc += "LazyMan.exe";
-                                        } else {
-                                            loc += "LazyMan.jar";
-                                        }
-                                    } else {
-                                        loc = new java.io.File(Props.class.getProtectionDomain().getCodeSource().getLocation().getPath()).getParent() + System.getProperty("file.separator") + "LazyMan.jar";
-                                    }
-                                    Runtime.getRuntime().exec("java -jar " + loc);
-                                    System.exit(0);
-                                }
-                            }
-                            MessageBox.show("Could not automatically update. Please manually update.", "Could not automatically update", 2);
-                        }
+                        MessageBox.show("New beta update available", version, build);
                     } else {
                         updateMI.setVisible(false);
                     }