diff -Naur dillo-0.8.6.orig/src/IO/Url.c dillo-0.8.6/src/IO/Url.c
--- dillo-0.8.6.orig/src/IO/Url.c	2006-01-03 20:44:32.000000000 +0100
+++ dillo-0.8.6/src/IO/Url.c	2007-04-16 13:33:13.000000000 +0200
@@ -83,7 +83,7 @@
 ChainFunction_t a_Url_get_ccc_funct(const DilloUrl *Url)
 {
    static UrlMethod2_t cccList[] = { {"http" , a_Http_ccc},
-                                     {"file" , a_Dpi_ccc},
+                                     {"file" , a_File_ccc},
                                      {"about", a_About_ccc},
                                      {"dpi" , a_Dpi_ccc},
                                      {"ftp" , a_Dpi_ccc},
diff -Naur dillo-0.8.6.orig/src/IO/Url.h dillo-0.8.6/src/IO/Url.h
--- dillo-0.8.6.orig/src/IO/Url.h	2005-10-27 18:20:22.000000000 +0200
+++ dillo-0.8.6/src/IO/Url.h	2007-04-16 13:33:13.000000000 +0200
@@ -29,6 +29,8 @@
 
 void a_Http_ccc (int Op, int Branch, int Dir, ChainLink *Info,
                  void *Data1, void *Data2);
+void a_File_ccc(int Op, int Branch, int Dir, ChainLink *Info,
+                 void *Data1, void *Data2);
 void a_About_ccc(int Op, int Branch, int Dir, ChainLink *Info,
                  void *Data1, void *Data2);
 void a_IO_ccc   (int Op, int Branch, int Dir, ChainLink *Info,
diff -Naur dillo-0.8.6.orig/src/IO/about.c dillo-0.8.6/src/IO/about.c
--- dillo-0.8.6.orig/src/IO/about.c	2006-04-26 18:17:48.000000000 +0200
+++ dillo-0.8.6/src/IO/about.c	2007-04-16 13:42:07.000000000 +0200
@@ -254,6 +254,28 @@
 "<table border='0' cellpadding='5' cellspacing='1' width='100%'>\n"
 "<tr>\n"
 " <td bgcolor='#CCCCCC'>\n"
+"  <h4>Iliad port (Antartica's modifications)</h4>\n"
+"  April 16, 2007\n"
+"<tr>\n"
+" <td bgcolor='#FFFFFF'>\n"
+"  <table border='0' cellspacing='0' cellpadding='5'>\n"
+"  <tr>\n"
+"   <td>\n"
+"<p>\n"
+"<ul><li>Integrated file URI handler\n"
+"<li>Page scroll is now done with mouse button 1\n"
+"<li>Click on images isolates them (athough if the image is a link, it follows it). Images with an aspect ratio weirder than 1:8 and 8:1 are ignored, as they usually are page decorations.\n"
+"<li>History forward is always enabled, and if there is no more history, it tries to guess the next page, based on the numbers in the urls (actually, it just adds 1 to the last number of the URL). Fixed a bug in this code in April 16 2007 version.\n"
+"</ul>\n"
+"  </table>\n"
+"</table>\n"
+"</table>\n"
+"<br>\n"
+"\n"
+"<table border='0' cellpadding='0' cellspacing='0' align='center' bgcolor='#000000' width='100%'><tr><td>\n"
+"<table border='0' cellpadding='5' cellspacing='1' width='100%'>\n"
+"<tr>\n"
+" <td bgcolor='#CCCCCC'>\n"
 "  <h4>Release overview</h4>\n"
 "  April 26, 2006\n"
 "<tr>\n"
diff -Naur dillo-0.8.6.orig/src/IO/file.c dillo-0.8.6/src/IO/file.c
--- dillo-0.8.6.orig/src/IO/file.c	1970-01-01 01:00:00.000000000 +0100
+++ dillo-0.8.6/src/IO/file.c	2007-04-16 13:33:13.000000000 +0200
@@ -0,0 +1,263 @@
+/*
+ * File: file.c
+ *
+ * Copyright (C) 1997 Raph Levien <raph@acm.org>
+ * Copyright (C) 1999, 2001 Jorge Arellano Cid <jcid@dillo.org>
+ * Copyright (C) 2007 Dario Rodriguez <dario@softhome.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <string.h>
+
+#include <config.h>
+#include "IO.h"
+#include "Url.h"
+#include "../nav.h"
+#include "../web.h"
+#include "../msg.h"
+
+typedef struct _FileInfo FileInfo_t;
+
+struct _FileInfo {
+   gint FD_Read;
+   gint FD_Write;
+};
+
+
+/*
+ * Header text for page
+ */
+static char Header_Generic1[]=
+"Content-Type: ";
+static char Header_Generic2[]=
+"\n\n";
+
+static struct {
+	int Off;
+	int Len;
+	char *Data;
+	char Dont_Care;
+	char *mime;
+} File_Magic[]={
+	{0,8,"\x89PNG\x0d\x0a\x1a\x0a",' ',"image/png"},
+	{0,6,"GIF87a",' ',"image/gif"},
+	{0,6,"GIF89a",' ',"image/gif"},
+	{0,8,"\xff\xd8    JFIF",' ',"image/jpeg"},
+	{0,8,"\xff\xd8    Exif",' ',"image/jpeg"},
+	{0,1,"<",' ',"text/html"},
+	{1,1,"<",' ',"text/html"},
+	{2,1,"<",' ',"text/html"},
+	{3,1,"<",' ',"text/html"},
+	{4,1,"<",' ',"text/html"},
+	{5,1,"<",' ',"text/html"},
+	{6,1,"<",' ',"text/html"},
+	{7,1,"<",' ',"text/html"},
+	{0,0,"",' ',"text/plain"},
+};
+#define MAGICREQBUFSIZE 8 
+
+#define ISHEX(x) (((x)>='0' && (x)<='9') || ((x)>='A' && (x)<='F') || ((x)>='a' && (x)<='f')) 
+#define HEX2BIN(x) (((x)>='0' && (x)<='9')?(x)-'0':((x)>='A' && (x)<='F')?(x)-'A'+10:((x)>='a' && (x)<='f')?(x)-'a'+10:0)
+
+/*
+ * Send the file screen through the IO using a pipe.
+ */
+static gint File_send_file(ChainLink *Info, DilloUrl *Urli, const char *file)
+{
+   gint FilePipe[2];
+   IOData_t *io1;
+   FileInfo_t *FileInfo;
+   struct stat stat_info;
+   int fd;
+   char *data;
+   char magic_data[MAGICREQBUFSIZE];
+   int total_read;
+   unsigned int type;
+   int i,k;
+   int header_size;
+   char *file_unscaped;
+
+   /* Get the unscaped file name */
+   if((file_unscaped=strdup(file))==NULL) {
+      MSG("File_send_file: insufficient memoryi for file name maniputation\n");
+      return -1;
+   }
+   for(i=0,k=0;file[k]!='\0';i++,k++) {
+   	if(file[k]=='%' && ISHEX(file[k+1]) && ISHEX(file[k+2])) {
+		file_unscaped[i]=((HEX2BIN(file[k+1])<<4)|HEX2BIN(file[k+2]));
+		k+=2;
+	} else 
+		file_unscaped[i]=file[k];
+   }
+   file_unscaped[i]='\0';
+   MSG("File_send_file: entered, file \"%s\"\n",file_unscaped);
+   /* Get the file info */
+   if((fd=open(file_unscaped,O_RDONLY))<=0) {
+      MSG("File_send_file: could not open \"%s\"\n",file_unscaped);
+      return -1;
+   }
+   free(file_unscaped),file_unscaped=NULL;
+
+   if((fstat(fd,&stat_info))!=0) {
+      close(fd);
+      MSG("File_send_file: could not determine file size\n");
+      return -1;
+   }
+
+   /* Identify the file */
+   memset(magic_data,0,sizeof(magic_data));
+   total_read=read(fd,magic_data,MAGICREQBUFSIZE);
+   if(total_read<0)
+   	total_read=0;
+
+   for(type=0;type<(sizeof(File_Magic)/sizeof(File_Magic[0]));type++) {
+   	for(i=0;i<File_Magic[type].Len;i++) {
+		if(magic_data[File_Magic[type].Off+i]!=File_Magic[type].Data[i] &&
+		  File_Magic[type].Data[i]!=File_Magic[type].Dont_Care)
+		   break;
+	}
+	if(i>=File_Magic[type].Len)
+		break; /* found */
+   }
+
+   if(type>=(sizeof(File_Magic)/sizeof(File_Magic[0]))) {
+   	close(fd);
+	MSG("File_send_file: type not identified\n");
+	return -1; /* not identified */
+   }
+
+   /* Get a buffer large enough for the file and header */
+   header_size=strlen(File_Magic[type].mime)+sizeof(Header_Generic1)-1+sizeof(Header_Generic2)-1;
+   if((data=malloc(stat_info.st_size+header_size))==NULL) {
+   	close(fd);
+	MSG("File_send_file: insufficient memory (requested %li bytes)\n",(long)stat_info.st_size+header_size);
+	return -1; /* insufficient memory */
+   }
+
+   /* Copy the header and the file magic */
+   i=0;
+   memcpy(data+i,Header_Generic1,sizeof(Header_Generic1)-1);
+   i+=sizeof(Header_Generic1)-1;
+   memcpy(data+i,File_Magic[type].mime,strlen(File_Magic[type].mime));
+   i+=strlen(File_Magic[type].mime);
+   memcpy(data+i,Header_Generic2,sizeof(Header_Generic2)-1);
+   i+=sizeof(Header_Generic2)-1;
+   memcpy(data+i,magic_data,total_read);
+   i+=total_read;
+
+   /* copy the reast of the file */
+   while(total_read<stat_info.st_size) {
+   	k=read(fd,data+i,stat_info.st_size-total_read);
+	if(k<=0) {
+		memset(data+i,0,stat_info.st_size-total_read);
+		break;
+	}
+	total_read+=k;
+	i+=k;
+   }
+   close(fd);
+
+   /* fire it up */
+   if (pipe(FilePipe)) 
+      return -1;
+   
+
+   FileInfo = g_new(FileInfo_t, 1);
+   FileInfo->FD_Read  = FilePipe[0];
+   FileInfo->FD_Write = FilePipe[1];
+   Info->LocalKey = FileInfo;
+
+   /* send file */
+   io1 = a_IO_new(IOWrite, FileInfo->FD_Write);
+   a_IO_set_buf(io1, data, stat_info.st_size+header_size);
+   io1->Flags |= (IOFlag_ForceClose + IOFlag_SingleWrite);
+   io1->Flags |= IOFlag_FreeIOBuf;
+   a_Chain_link_new(Info, a_File_ccc, BCK, a_IO_ccc, 1, 1);
+   a_Chain_bcb(OpStart, Info, io1, NULL);
+   a_Chain_bcb(OpSend, Info, io1, NULL);
+
+   /* Tell the cache to receive answer */
+   a_Chain_fcb(OpSend, Info, &FileInfo->FD_Read, NULL);
+   return FileInfo->FD_Read;
+}
+
+/*
+ * Push the right URL for each supported "file"
+ * ( Data1 = Requested URL; Data2 = Web structure )
+ */
+static gint File_get(ChainLink *Info, void *Data1, void *Data2)
+{
+   const char *tail;
+   DilloUrl *Url = Data1;
+   DilloWeb *web = Data2;
+
+   MSG("File_get: entered\n");
+   /* Don't allow the "file:" method for non-root URLs */
+   if (!(web->flags & WEB_RootUrl)) {
+      MSG("File_get: aborting: non-root URL\n");
+      return -1;
+   }
+
+   tail = URL_PATH(Url);
+
+   return File_send_file(Info, Url, tail);
+   return -1;
+}
+
+/*
+ * CCC function for the FILE module
+ */
+void a_File_ccc(int Op, int Branch, int Dir, ChainLink *Info,
+                 void *Data1, void *Data2)
+{
+   int FD;
+
+   a_Chain_debug_msg("a_File_ccc", Op, Branch, Dir);
+
+   if ( Branch == 1 ) {
+      /* Start file method */
+      if (Dir == BCK) {
+         switch (Op) {
+         case OpStart:
+            /* (Data1 = Url;  Data2 = Web) */
+            // Info->LocalKey gets set in File_get
+            if ((FD = File_get(Info, Data1, Data2)) == -1)
+               a_Chain_fcb(OpAbort, Info, NULL, NULL);
+            break;
+         case OpAbort:
+            a_Chain_bcb(OpAbort, Info, NULL, NULL);
+            g_free(Info->LocalKey);
+            g_free(Info);
+            break;
+         }
+      } else {  /* FWD */
+         switch (Op) {
+         case OpSend:
+            /* This means the sending framework was set OK */
+            FD = ((FileInfo_t *)Info->LocalKey)->FD_Read;
+            a_Chain_fcb(OpSend, Info, &FD, NULL);
+            break;
+         case OpEnd:
+            /* Everything sent! */
+            a_Chain_del_link(Info, BCK);
+            g_free(Info->LocalKey);
+            a_Chain_fcb(OpEnd, Info, NULL, NULL);
+            break;
+         case OpAbort:
+            g_free(Info->LocalKey);
+            a_Chain_fcb(OpAbort, Info, NULL, NULL);
+            break;
+         }
+      }
+   }
+}
+
diff -Naur dillo-0.8.6.orig/src/dw_gtk_scrolled_frame.c dillo-0.8.6/src/dw_gtk_scrolled_frame.c
--- dillo-0.8.6.orig/src/dw_gtk_scrolled_frame.c	2006-01-02 19:18:34.000000000 +0100
+++ dillo-0.8.6/src/dw_gtk_scrolled_frame.c	2007-02-26 13:50:29.000000000 +0100
@@ -562,7 +562,7 @@
    if (!GTK_WIDGET_HAS_FOCUS (widget))
       gtk_widget_grab_focus (widget);
 
-   if (event->button == 2) {
+   if (event->button == 1) {
       frame = GTK_DW_SCROLLED_FRAME (widget);
 
       frame->button2_pressed = TRUE;
@@ -570,7 +570,7 @@
       frame->start_lmy = event->y;
 
       gdk_pointer_grab (widget->window, FALSE,
-                        GDK_BUTTON_RELEASE_MASK | GDK_BUTTON2_MOTION_MASK,
+                        GDK_BUTTON_RELEASE_MASK | GDK_BUTTON1_MOTION_MASK,
                         NULL, frame->drag_cursor, event->time);
 
    }
@@ -601,7 +601,7 @@
 
    /* frame->button2_pressed makes sure that the button was pressed
       in the GtkDwScrolledFrame */
-   if ((event->state & GDK_BUTTON2_MASK) && frame->button2_pressed) {
+   if ((event->state & GDK_BUTTON1_MASK) && frame->button2_pressed) {
       Dw_gtk_scrolled_frame_move_by (frame,
                                      frame->start_lmx - event->x,
                                      frame->start_lmy - event->y);
diff -Naur dillo-0.8.6.orig/src/html.c dillo-0.8.6/src/html.c
--- dillo-0.8.6.orig/src/html.c	2006-04-12 17:50:35.000000000 +0200
+++ dillo-0.8.6/src/html.c	2007-02-28 13:14:52.000000000 +0100
@@ -407,6 +407,10 @@
       gtk_menu_popup(GTK_MENU(bw->menu_popup.over_image), NULL, NULL,
                      NULL, NULL, event->button, event->time);
       return TRUE;
+   } else if(event->button == 1 && image->url && 
+		   ( (image->height*8)>image->width && 
+		      image->height<(image->width*8) ) ) {
+     a_Nav_push(bw, image->url);
    }
 
    return FALSE;
diff -Naur dillo-0.8.6.orig/src/interface.c dillo-0.8.6/src/interface.c
--- dillo-0.8.6.orig/src/interface.c	2005-12-02 13:40:44.000000000 +0100
+++ dillo-0.8.6/src/interface.c	2007-02-26 17:05:28.000000000 +0100
@@ -183,8 +183,7 @@
    /* Back and Forward buttons */
    back_sensitive = a_Nav_stack_ptr(bw) > 0;
    gtk_widget_set_sensitive(bw->back_button, back_sensitive);
-   forw_sensitive = (a_Nav_stack_ptr(bw) < a_Nav_stack_size(bw) - 1 &&
-                     !bw->nav_expecting);
+   forw_sensitive = 1;
    gtk_widget_set_sensitive(bw->forw_button, forw_sensitive);
 
    bw->sens_idle_id = 0;
@@ -871,7 +870,7 @@
                       GTK_SIGNAL_FUNC(Interface_quit), bw);
    gtk_container_border_width(GTK_CONTAINER(bw->main_window), 0);
 
-   gtk_window_set_wmclass(GTK_WINDOW(bw->main_window), "dillo", "Dillo");
+   gtk_window_set_wmclass(GTK_WINDOW(bw->main_window), "sh", "sh");
 
    /* -RL :: I must realize the window to see it correctly */
    gtk_widget_realize(bw->main_window);
diff -Naur dillo-0.8.6.orig/src/nav.c dillo-0.8.6/src/nav.c
--- dillo-0.8.6.orig/src/nav.c	2006-01-02 19:17:23.000000000 +0100
+++ dillo-0.8.6/src/nav.c	2007-04-16 13:32:39.000000000 +0200
@@ -306,7 +306,7 @@
 /*
  * Send the browser to next page in the history list
  */
-void a_Nav_forw(BrowserWindow *bw)
+void a_Nav_forw2(BrowserWindow *bw)
 {
    gint idx = a_Nav_stack_ptr(bw);
 
@@ -318,6 +318,59 @@
 }
 
 /*
+ * Increment the last digit of the last number in the URL 
+ * Sorry for the code: it's a quick hack.
+ */
+
+void a_Nav_forw(BrowserWindow *bw)
+{
+	int forw_sensitive;
+	DilloUrl *new;
+	gchar *str;
+	gint i,n;
+	/* check if there are pages in the history */
+	forw_sensitive = (a_Nav_stack_ptr(bw) < a_Nav_stack_size(bw) - 1 &&
+			                     !bw->nav_expecting);
+	if(forw_sensitive) {
+		a_Nav_forw2(bw);
+		return;
+	}
+	/* get the current url and serach for the last number */
+	str=malloc(strlen(a_Url_str(a_History_get_url(NAV_IDX(bw,a_Nav_stack_ptr(bw)))))+2);
+	strcpy(str,a_Url_str(a_History_get_url(NAV_IDX(bw,a_Nav_stack_ptr(bw)))));
+	for(i=0;str[i]!='\0';i++)
+		;
+	for(;i>=0;i--) {
+		if(str[i]>='0' && str[i]<='9')
+			break;
+	}
+	if(i<0)
+		return; /* no numbers in URL */
+	/* add 1 to the last number of the URL, enlarging its length is neccessary */	
+	n=1;
+	do {
+		str[i]=str[i]+n;
+		if(str[i]>'9')
+			str[i]='0',n=1;
+		else
+			n=0;
+		i--;
+	} while(i>=0 && n>0 && str[i]>='0' && str[i]<='9');	
+	if(n>0) {
+		i++;
+		memmove(str+i+1,str+i,strlen(str+i));
+		str[i]=n+'0';
+		n=0;
+	}
+	/* Push the new URL into the history to make dillo load it */
+	new=a_Url_new(str,NULL, 0, 0, 0);
+   	a_Nav_push(bw, new);
+	a_Url_free(new);
+	free(str);
+}
+
+
+/*
  * Redirect the browser to the HOME page!
  */
 void a_Nav_home(BrowserWindow *bw)
@@ -388,7 +441,7 @@
       a_Url_set_flags(ReqURL, URL_FLAGS(ReqURL) | URL_E2EReload);
       /* This is an explicit reload, so clear the SpamSafe flag */
       a_Url_set_flags(ReqURL, URL_FLAGS(ReqURL) & ~URL_SpamSafe);
-      Nav_open_url(bw, ReqURL, 0);
+      Nav_open_url(bw, ReqURL, 1);
       a_Url_free(ReqURL);
    }
 }
diff -Naur dillo-0.8.6.orig/src/selection.c dillo-0.8.6/src/selection.c
--- dillo-0.8.6.orig/src/selection.c	2006-01-02 19:16:32.000000000 +0100
+++ dillo-0.8.6/src/selection.c	2007-02-26 13:48:38.000000000 +0100
@@ -142,7 +142,7 @@
    a_Dw_widget_print_tree (GTK_DW_VIEWPORT(it->widget->viewport)->child);
 #endif
 
-   if (event && event->button == 1 &&
+   if (event && event->button == 2 &&
        !within_content && event->type == GDK_2BUTTON_PRESS) {
       /* When the user double-clicks on empty parts, call the callback
        * function instead of normal processing. Used for full screen
@@ -180,7 +180,7 @@
          }
       } else {
          /* normal selection handling */
-         if (event && event->button == 1) {
+         if (event && event->button == 2) {
             Selection_highlight (selection, FALSE);
             Selection_reset_selection (selection);
 
@@ -239,7 +239,7 @@
                                   "link_clicked", link, -1, -1, event,
                                   &dummy);
       } else {
-         if (event->button == 1)
+         if (event->button == 2)
             /* Reset links and switch to selection mode. The selection
              * state will be set to SELECTING, which is handled some lines
              * below. */
@@ -248,7 +248,7 @@
    }
 
    if (selection->selection_state == SELECTION_SELECTING &&
-       event && event->button == 1) {
+       event && event->button == 2) {
       /* normal selection */
       ret = TRUE;
       Selection_adjust_selection (selection, it, char_pos);

