Pad URLs now include theme parameter for theming
This commit is contained in:
parent
d5207b54b0
commit
9324818e77
@ -813,9 +813,7 @@ public class CodeEditor extends javax.swing.JInternalFrame {
|
|||||||
try {
|
try {
|
||||||
String padid = Pads.genPad(id, codeBox.getText());
|
String padid = Pads.genPad(id, codeBox.getText());
|
||||||
Pads.addPad(padid);
|
Pads.addPad(padid);
|
||||||
MainGUI.loadFrame(new WebBrowser("Pad " + padid,
|
Pads.loadPad(padid);
|
||||||
Pads.PADS_URL + "/p/" + padid,
|
|
||||||
WebBrowser.PAD_LOGO));
|
|
||||||
JOptionPane.showInternalMessageDialog(this,
|
JOptionPane.showInternalMessageDialog(this,
|
||||||
new SharePad(padid),
|
new SharePad(padid),
|
||||||
"Share Pad",
|
"Share Pad",
|
||||||
|
|||||||
@ -243,6 +243,16 @@ public class Pads extends javax.swing.JInternalFrame {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void loadPad(String pad) {
|
||||||
|
String theme = "";
|
||||||
|
if (PrefStorage.getSetting("theme").equals("dark")) {
|
||||||
|
theme = "?theme=terminal";
|
||||||
|
}
|
||||||
|
MainGUI.loadFrame(new WebBrowser("Pad " + pad,
|
||||||
|
PADS_URL + "/p/" + pad + theme,
|
||||||
|
WebBrowser.PAD_LOGO));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is called from within the constructor to initialize the form.
|
* This method is called from within the constructor to initialize the form.
|
||||||
* WARNING: Do NOT modify this code. The content of this method is always
|
* WARNING: Do NOT modify this code. The content of this method is always
|
||||||
@ -429,9 +439,7 @@ public class Pads extends javax.swing.JInternalFrame {
|
|||||||
}//GEN-LAST:event_previewBtnActionPerformed
|
}//GEN-LAST:event_previewBtnActionPerformed
|
||||||
|
|
||||||
private void openBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openBtnActionPerformed
|
private void openBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_openBtnActionPerformed
|
||||||
MainGUI.loadFrame(new WebBrowser("Pad " + getSelectedPad(),
|
loadPad(getSelectedPad());
|
||||||
PADS_URL + "/p/" + getSelectedPad(),
|
|
||||||
WebBrowser.PAD_LOGO));
|
|
||||||
}//GEN-LAST:event_openBtnActionPerformed
|
}//GEN-LAST:event_openBtnActionPerformed
|
||||||
|
|
||||||
private void purgeBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_purgeBtnActionPerformed
|
private void purgeBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_purgeBtnActionPerformed
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user