forked from I2P_Developers/i2p.i2p
DTG: Fix NPE and disable logging in config frame
This commit is contained in:
@@ -28,8 +28,8 @@ public class DesktopguiConfigurationFrame extends javax.swing.JFrame {
|
|||||||
|
|
||||||
/** Creates new form ConfigurationFrame */
|
/** Creates new form ConfigurationFrame */
|
||||||
public DesktopguiConfigurationFrame(RouterContext ctx) {
|
public DesktopguiConfigurationFrame(RouterContext ctx) {
|
||||||
initComponents();
|
|
||||||
_context = ctx;
|
_context = ctx;
|
||||||
|
initComponents();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This method is called from within the constructor to
|
/** This method is called from within the constructor to
|
||||||
@@ -95,7 +95,7 @@ public class DesktopguiConfigurationFrame extends javax.swing.JFrame {
|
|||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
private void cancelButtonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cancelButtonMouseReleased
|
private void cancelButtonMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cancelButtonMouseReleased
|
||||||
System.out.println("Cancelling configuration change.");
|
//System.out.println("Cancelling configuration change.");
|
||||||
this.dispose();
|
this.dispose();
|
||||||
}//GEN-LAST:event_cancelButtonMouseReleased
|
}//GEN-LAST:event_cancelButtonMouseReleased
|
||||||
|
|
||||||
@@ -112,18 +112,17 @@ public class DesktopguiConfigurationFrame extends javax.swing.JFrame {
|
|||||||
String value;
|
String value;
|
||||||
if(!desktopguiEnabled.isSelected()) {
|
if(!desktopguiEnabled.isSelected()) {
|
||||||
value = "false";
|
value = "false";
|
||||||
System.out.println("Disabling desktopgui");
|
//System.out.println("Disabling desktopgui");
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
value = "true";
|
value = "true";
|
||||||
System.out.println("Enabling desktopgui");
|
//System.out.println("Enabling desktopgui");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
_context.router().saveConfig(property, value);
|
_context.router().saveConfig(property, value);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
Logger.getLogger(DesktopguiConfigurationFrame.class.getName()).log(Level.SEVERE, null, ex);
|
Logger.getLogger(DesktopguiConfigurationFrame.class.getName()).log(Level.SEVERE, null, ex);
|
||||||
}
|
}
|
||||||
System.out.println("Applying desktopgui configuration!");
|
//System.out.println("Applying desktopgui configuration!");
|
||||||
this.dispose();
|
this.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user