[freenet-cvs] r19127 - trunk/apps/thingamablog/src/net/sf/thingamablog/gui/properties

dieppe at freenetproject.org dieppe at freenetproject.org
Thu Apr 10 01:20:13 UTC 2008


Author: dieppe
Date: 2008-04-10 01:20:13 +0000 (Thu, 10 Apr 2008)
New Revision: 19127

Modified:
   trunk/apps/thingamablog/src/net/sf/thingamablog/gui/properties/TBGeneralPanel.java
Log:
If the publish transport of the blog is set to FCP, don't allow the user 
to edit the *Url fields.



Modified: trunk/apps/thingamablog/src/net/sf/thingamablog/gui/properties/TBGeneralPanel.java
===================================================================
--- trunk/apps/thingamablog/src/net/sf/thingamablog/gui/properties/TBGeneralPanel.java	2008-04-10 00:26:34 UTC (rev 19126)
+++ trunk/apps/thingamablog/src/net/sf/thingamablog/gui/properties/TBGeneralPanel.java	2008-04-10 01:20:13 UTC (rev 19127)
@@ -25,6 +25,7 @@
 import net.atlanticbb.tantlinger.ui.text.TextEditPopupManager;
 import net.sf.thingamablog.blog.TBWeblog;
 import net.sf.thingamablog.gui.LabelledItemPanel;
+import net.sf.thingamablog.transport.FCPTransport;
 
 
 /**
@@ -120,6 +121,9 @@
     public TBGeneralPanel(TBWeblog blog)
     {
     	weblog = blog;
+        boolean setEditable = true;
+        if (weblog.getPublishTransport() instanceof FCPTransport)
+            setEditable = false;
     	
     	TextEditPopupManager popupMan = TextEditPopupManager.getInstance();
 		titleField = new JTextField();
@@ -169,14 +173,17 @@
 		urlField = new JTextField();
 		urlField.setText(weblog.getBaseUrl());
 		popupMan.registerJTextComponent(urlField);
+                urlField.setEditable(setEditable);
 		
 		arcUrlField = new JTextField();
 		arcUrlField.setText(weblog.getArchiveUrl());
 		popupMan.registerJTextComponent(arcUrlField);
+                arcUrlField.setEditable(setEditable);
 		
 		mediaUrlField = new JTextField();
 		mediaUrlField.setText(weblog.getMediaUrl());
 		popupMan.registerJTextComponent(mediaUrlField);
+                mediaUrlField.setEditable(setEditable);
 		
 		setLayout(new BorderLayout(5, 5));
 		setBorder(new EmptyBorder(5, 5, 5, 5));




More information about the cvs mailing list