revert my last commit until I get time to fix it
authorLuke Plant <L.Plant.98@cantab.net>
Wed, 19 Nov 2003 01:41:19 +0000 (01:41 +0000)
committerLuke Plant <L.Plant.98@cantab.net>
Wed, 19 Nov 2003 01:41:19 +0000 (01:41 +0000)
ChangeLog.claws
configure.ac
src/textview.c

index f7ae340..1ed7109 100644 (file)
@@ -1,3 +1,7 @@
+2003-11-19 [luke]      0.9.6claws80
+       * src/textview.c
+               revert my last commit until I get time to fix it
+
 2003-11-18 [christoph] 0.9.6claws79
 
        * src/mimeview.[ch]
index 05de364..a36a936 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=79
+EXTRA_VERSION=80
 if test $EXTRA_VERSION -eq 0; then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}claws
 else
index d96ca91..3c0d6f5 100644 (file)
@@ -51,7 +51,6 @@
 #include "displayheader.h"
 #include "account.h"
 #include "mimeview.h"
-#include "alertpanel.h"
 
 typedef struct _RemoteURI      RemoteURI;
 
@@ -1790,67 +1789,6 @@ static gint show_url_timeout_cb(gpointer data)
                return FALSE;
 }
 
-/*!
- *\brief    Check to see if a web URL has been disguised as a different
- *          URL (possible with HTML email).
- *
- *\param    uri The uri to check
- *
- *\param    textview The TextView the URL is contained in
- *
- *\return   gboolean TRUE if the URL is ok, or if the user chose to open
- *          it anyway, otherwise FALSE          
- */
-static gboolean uri_security_check(RemoteURI *uri, TextView *textview) 
-{
-       gchar *clicked_str;
-       gboolean retval = TRUE;
-
-       if (g_strncasecmp(uri->uri, "http:", 5) &&
-           g_strncasecmp(uri->uri, "https:", 6) &&
-           g_strncasecmp(uri->uri, "www.", 4)) 
-               return retval;
-
-       clicked_str = gtk_editable_get_chars(GTK_EDITABLE(textview->text),
-                                            uri->start,
-                                            uri->end);
-       
-       if (strcmp(clicked_str, uri->uri) &&
-           (!g_strncasecmp(clicked_str, "http:",  5) ||
-            !g_strncasecmp(clicked_str, "https:", 6) ||
-            !g_strncasecmp(clicked_str, "www.",   4))) {
-               retval = FALSE;
-
-               /* allow uri->uri    == http://somewhere.com
-                  and   clicked_str ==        somewhere.com */
-               gchar *str = g_strconcat("http://", clicked_str, NULL);
-
-               if (!g_strcasecmp(str, uri->uri))
-                       retval = TRUE;
-               g_free(str);
-       }
-
-       if (retval == FALSE) {
-               gchar *msg = NULL;
-               AlertValue resp;
-
-               msg = g_strdup_printf(_("The real URL (%s) is different from\n"
-                                       "the apparent URL (%s).  \n"
-                                       "Open it anyway?"),
-                                       uri->uri, clicked_str);
-               resp = alertpanel(_("Warning"), 
-                                 msg,
-                                 _("Yes"), 
-                                 _("No"),
-                                 NULL);
-               g_free(msg);
-               if (resp == G_ALERTDEFAULT)
-                       retval = TRUE;
-       } 
-       g_free(clicked_str);
-       return retval;
-}
-
 static gint textview_button_pressed(GtkWidget *widget, GdkEventButton *event,
                                    TextView *textview)
 {
@@ -1933,9 +1871,8 @@ static gint textview_button_released(GtkWidget *widget, GdkEventButton *event,
                                                compose_new(account, uri->uri + 7, NULL);
                                        }
                                } else {
-                                       if (uri_security_check(uri, textview) == TRUE) 
-                                               open_uri(uri->uri,
-                                                        prefs_common.uri_cmd);
+                                       open_uri(uri->uri,
+                                                prefs_common.uri_cmd);
                                }
                                g_free(trimmed_uri);
                        }