Author: dieppe
Date: 2008-03-12 05:37:32 +0000 (Wed, 12 Mar 2008)
New Revision: 18481
Modified:
trunk/apps/thingamablog/src/net/sf/thingamablog/TBGlobals.java
trunk/apps/thingamablog/src/net/sf/thingamablog/gui/app/TBOptionsDialog.java
trunk/apps/thingamablog/src/net/sf/thingamablog/gui/app/ThingamablogFrame.java
Log:
Visualisation of the flog is now functionnal (thanks to nextgens'
modifications).
Changes :
- new property : fproxy port;
- fixing the url we give to BrowserLaunch.launch();
Modified: trunk/apps/thingamablog/src/net/sf/thingamablog/TBGlobals.java
===================================================================
--- trunk/apps/thingamablog/src/net/sf/thingamablog/TBGlobals.java
2008-03-12 04:23:54 UTC (rev 18480)
+++ trunk/apps/thingamablog/src/net/sf/thingamablog/TBGlobals.java
2008-03-12 05:37:32 UTC (rev 18481)
@@ -116,6 +116,7 @@
//node properties
private static String nodePort = "9481";
private static String nodeHostname = "localhost";
+ private static String fproxyPort = "8888";
//auto feed updater stuff
private static int feedUpdateInterval = 1800000;//30 minutes
@@ -281,6 +282,8 @@
nodePort = props.getProperty("NODE_PORT");
if(props.get("NODE_HOSTNAME") != null)
nodeHostname = props.getProperty("NODE_HOSTNAME");
+ if(props.get("FRPOXY_PORT") != null)
+ fproxyPort = props.getProperty("FPROXY_PORT");
}
catch(FileNotFoundException fnfe)
{
@@ -331,6 +334,7 @@
props.put("PING_AFTER_PUB", isPingAfterPub + "");
props.put("NODE_PORT", nodePort);
props.put("NODE_HOSTNAME", nodeHostname);
+ props.put("FPROXY_PORT",fproxyPort);
//Browser.save(props);
props.store(fos, "Thingamablog Properties");
@@ -546,6 +550,27 @@
}
/**
+ * Sets the port of fproxy
+ * @param port
+ */
+ public static void setFProxyPort(String port)
+ {
+ if(port == null || port.equals(""))
+ fproxyPort = "8888";
+ else
+ fproxyPort = port;
+ }
+
+ /**
+ * Gets the port of fproxy
+ * @return
+ */
+ public static String getFProxyPort()
+ {
+ return fproxyPort;
+ }
+
+ /**
* Sets the hostname of the machine the node is running on
* @param hostname
*/
Modified:
trunk/apps/thingamablog/src/net/sf/thingamablog/gui/app/TBOptionsDialog.java
===================================================================
---
trunk/apps/thingamablog/src/net/sf/thingamablog/gui/app/TBOptionsDialog.java
2008-03-12 04:23:54 UTC (rev 18480)
+++
trunk/apps/thingamablog/src/net/sf/thingamablog/gui/app/TBOptionsDialog.java
2008-03-12 05:37:32 UTC (rev 18481)
@@ -114,6 +114,7 @@
private JTextField nodePortTf;
private JTextField hostNameTf;
+ private JTextField fproxyPortTf;
private JTextArea feedItemArea;
private JCheckBox updateNewsCb;
@@ -240,6 +241,7 @@
//node components
nodePortTf = new JTextField(10);
hostNameTf = new JTextField(20);
+ fproxyPortTf = new JTextField(10);
@@ -341,6 +343,7 @@
lip = new LabelledItemPanel();
lip.addItem(i18n.str("node_port"), nodePortTf);
lip.addItem(i18n.str("node_hostname"), hostNameTf);
+ lip.addItem(i18n.str("fproxy_port"), fproxyPortTf);
lip.setBorder(new TitledBorder(i18n.str("node_details")));
nodePanel.add(lip, BorderLayout.NORTH);
@@ -370,6 +373,7 @@
socksPasswordField.setText(TBGlobals.getSocksProxyPassword());
nodePortTf.setText(TBGlobals.getNodePort());
hostNameTf.setText(TBGlobals.getNodeHostname());
+ fproxyPortTf.setText(TBGlobals.getFProxyPort());
updateProxyComponentsEnabledState();
}
@@ -430,6 +434,7 @@
TBGlobals.setSocksProxyPassword(new
String(socksPasswordField.getPassword()));
TBGlobals.setNodePort(nodePortTf.getText());
TBGlobals.setNodeHostname(hostNameTf.getText());
+ TBGlobals.setFProxyPort(fproxyPortTf.getText());
if(layout2ColRb.isSelected())
TBGlobals.setLayoutStyle(TBGlobals.TWO_COL);
Modified:
trunk/apps/thingamablog/src/net/sf/thingamablog/gui/app/ThingamablogFrame.java
===================================================================
---
trunk/apps/thingamablog/src/net/sf/thingamablog/gui/app/ThingamablogFrame.java
2008-03-12 04:23:54 UTC (rev 18480)
+++
trunk/apps/thingamablog/src/net/sf/thingamablog/gui/app/ThingamablogFrame.java
2008-03-12 05:37:32 UTC (rev 18481)
@@ -102,7 +102,9 @@
import net.sf.thingamablog.gui.properties.TBWizardDialog;
import net.sf.thingamablog.gui.properties.WeblogPropertiesDialogFactory;
import net.sf.thingamablog.gui.table.JSortTable;
+import net.sf.thingamablog.transport.FCPTransport;
import net.sf.thingamablog.transport.LoginFactory;
+import net.sf.thingamablog.transport.PublishTransport;
import net.sf.thingamablog.xml.OPMLImportExport;
import net.sf.thingamablog.xml.RSSImportExport;
import net.sf.thingamablog.xml.TBPersistFactory;
@@ -3554,8 +3556,15 @@
} else {
try
{
- String nodeHostname =
TBGlobals.getProperty("NODE_HOSTNAME");
- BrowserLaunch.launch("http://" +
nodeHostname + ":8888" + curSelWeblog.getFrontPageUrl());
+ PublishTransport pt =
curSelWeblog.getPublishTransport();
+ String nodeHostname;
+ String port =
TBGlobals.getProperty("FPROXY_PORT");
+ if ( pt instanceof FCPTransport) {
+ nodeHostname = ((FCPTransport)
pt).getHostname();
+ } else {
+ nodeHostname =
TBGlobals.getProperty("NODE_HOSTNAME");
+ }
+ BrowserLaunch.launch("http://" +
nodeHostname + ":" + port + "/" + curSelWeblog.getFrontPageUrl());
}
catch(Exception ex)
{