Hello,

here is a little patch for thingamablog, to force it to accept a freenet
URI in the configuration :

--- a/src/net/sf/thingamablog/gui/properties/TBWizardDialog.java 
2007-12-02 09:17:34.000000000 +0100
+++ b/src/net/sf/thingamablog/gui/properties/TBWizardDialog.java     
2008-02-02 20:27:53.000000000 +0100
@@ -377,7 +377,7 @@
                        }
                        catch(MalformedURLException ex) //invalid url
                        {
-                               urlField.setText("http://"; +
urlField.getText()); //$NON-NLS-1$
+                               //urlField.setText("http://"; +
urlField.getText()); //$NON-NLS-1$
                        }

                        return true;


--- a/src/net/sf/thingamablog/gui/properties/TBGeneralPanel.java 
2007-12-02 09:17:36.000000000 +0100
+++ b/src/net/sf/thingamablog/gui/properties/TBGeneralPanel.java     
2008-02-02 21:31:14.000000000 +0100
@@ -237,13 +237,21 @@
                                return false;
                }

-               if(!isValidUrl(base))
-                       return false;
-               if(!isValidUrl(arc))
-                       return false;
-               if(!isValidUrl(media))
-                       return false;

+                if(isValidUrl(base))
+                {
+                    if(isValidUrl(arc))
+                    {
+                        isValidUrl(media);
+                    }
+                }
+               
                if(!arc.startsWith(base))
                {
                        JOptionPane.showMessageDialog(this,
@@ -274,7 +282,7 @@
        catch(Exception ex)//malformed url
        {
                        JOptionPane.showMessageDialog(this,
-                               u + i18n.str("invalid_url_prompt"),
//$NON-NLS-1$
+                               u + i18n.str("invalid_url_prompt") +
i18n.str("ask_freenet"), //$NON-NLS-1$
                                i18n.str("warning"),
JOptionPane.WARNING_MESSAGE); //$NON-NLS-1$
                return false;
        }


(if we do exactly what the patch says, we need a new message ask_freenet
(like "if you use freenet, it is normal") in those files :
src/net/sf/thingamablog/gui/messages*.properties)

Reply via email to