summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--!NetSurf/Resources/de/Messages1
-rw-r--r--!NetSurf/Resources/en/Messages1
-rw-r--r--!NetSurf/Resources/fr/Messages1
-rwxr-xr-x!NetSurf/Resources/it/Messages1
-rw-r--r--!NetSurf/Resources/nl/Messages1
-rwxr-xr-xamiga/gui.c1
-rwxr-xr-xamiga/gui.h5
-rwxr-xr-xamiga/history_local.c128
-rwxr-xr-xamiga/menu.c4
9 files changed, 94 insertions, 49 deletions
diff --git a/!NetSurf/Resources/de/Messages b/!NetSurf/Resources/de/Messages
index 4dcf9c58c..a145f882f 100644
--- a/!NetSurf/Resources/de/Messages
+++ b/!NetSurf/Resources/de/Messages
@@ -259,6 +259,7 @@ ClearNS:Clear selection
#
Browser:Browser
HistGlobalNS:Show global history...
+HistLocalNS:Show local history...
FindTextNS:Find text...
# Hotlist menu
diff --git a/!NetSurf/Resources/en/Messages b/!NetSurf/Resources/en/Messages
index 222b8942b..1cf13018d 100644
--- a/!NetSurf/Resources/en/Messages
+++ b/!NetSurf/Resources/en/Messages
@@ -259,6 +259,7 @@ ClearNS:Clear selection
#
Browser:Browser
HistGlobalNS:Show global history...
+HistLocalNS:Show local history...
FindTextNS:Find text...
# Hotlist menu
diff --git a/!NetSurf/Resources/fr/Messages b/!NetSurf/Resources/fr/Messages
index 76d037f8c..2533829fa 100644
--- a/!NetSurf/Resources/fr/Messages
+++ b/!NetSurf/Resources/fr/Messages
@@ -259,6 +259,7 @@ ClearNS:Clear selection
#
Browser:Browser
HistGlobalNS:Show global history...
+HistLocalNS:Show local history...
FindTextNS:Find text...
# Hotlist menu
diff --git a/!NetSurf/Resources/it/Messages b/!NetSurf/Resources/it/Messages
index ea3710a8b..0541088de 100755
--- a/!NetSurf/Resources/it/Messages
+++ b/!NetSurf/Resources/it/Messages
@@ -260,6 +260,7 @@ ClearNS:Cancella selezione
#
Browser:Browser
HistGlobalNS:Mostra cronologia globale...
+HistLocalNS:Show local history...
FindTextNS:Find text...
# Hotlist menu
diff --git a/!NetSurf/Resources/nl/Messages b/!NetSurf/Resources/nl/Messages
index 9626e2559..0fcbabcc6 100644
--- a/!NetSurf/Resources/nl/Messages
+++ b/!NetSurf/Resources/nl/Messages
@@ -259,6 +259,7 @@ ClearNS:Clear selection
#
Browser:Browser
HistGlobalNS:Show global history...
+HistLocalNS:Show local history...
FindTextNS:Find text...
# Hotlist menu
diff --git a/amiga/gui.c b/amiga/gui.c
index 92e87f0b9..6a31901cd 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -171,7 +171,6 @@ void ami_update_throbber(struct gui_window_2 *g,bool redraw);
void ami_update_buttons(struct gui_window_2 *);
void ami_scroller_hook(struct Hook *,Object *,struct IntuiMessage *);
uint32 ami_popup_hook(struct Hook *hook,Object *item,APTR reserved);
-void ami_do_redraw(struct gui_window_2 *g,bool scroll);
void ami_init_mouse_pointers(void);
void ami_switch_tab(struct gui_window_2 *gwin,bool redraw);
#ifdef WITH_HUBBUB
diff --git a/amiga/gui.h b/amiga/gui.h
index 7ab824a5e..9523d87af 100755
--- a/amiga/gui.h
+++ b/amiga/gui.h
@@ -24,6 +24,7 @@
#include "desktop/browser.h"
#include <dos/dos.h>
#include "desktop/gui.h"
+#include "amiga/history_local.h"
#ifdef NS_AMIGA_CAIRO
#include <cairo/cairo.h>
#endif
@@ -117,7 +118,7 @@ struct gui_window
int scrollx;
int scrolly;
char *dlfilename;
-// struct browser_window *bw; // not used
+ struct history_window *hw; // not used
};
struct gui_globals
@@ -139,6 +140,8 @@ void ami_update_pointer(struct Window *win, gui_pointer_shape shape);
void ami_close_all_tabs(struct gui_window_2 *gwin);
void ami_quit_netsurf(void);
void ami_get_theme_filename(char *filename,char *themestring);
+void ami_clearclipreg(struct RastPort *rp);
+void ami_do_redraw(struct gui_window_2 *g,bool scroll);
struct RastPort *currp;
struct TextFont *origrpfont;
diff --git a/amiga/history_local.c b/amiga/history_local.c
index df33f11f8..969c6e1fc 100755
--- a/amiga/history_local.c
+++ b/amiga/history_local.c
@@ -35,6 +35,7 @@
#include <proto/intuition.h>
#include "amiga/history_local.h"
#include <proto/exec.h>
+#include <proto/graphics.h>
#include <proto/window.h>
#include <proto/space.h>
@@ -44,7 +45,6 @@
#include <reaction/reaction.h>
#include <reaction/reaction_macros.h>
-static struct browser_window *history_bw;
static struct history *history_current = 0;
/* Last position of mouse in window. */
static int mouse_x = 0;
@@ -52,9 +52,6 @@ static int mouse_x = 0;
static int mouse_y = 0;
static struct history_window *hwindow;
-//static void ami_history_redraw(wimp_draw *redraw);
-//static bool ami_history_click(wimp_pointer *pointer);
-
/**
* Open history window.
*
@@ -70,43 +67,47 @@ void ami_history_open(struct browser_window *bw, struct history *history)
assert(history);
history_current = history;
- history_bw = bw;
-
- if(hwindow) return;
-
- hwindow = AllocVec(sizeof(struct history_window),MEMF_CLEAR | MEMF_PRIVATE);
-
- history_size(history, &width, &height);
-
- hwindow->objects[OID_MAIN] = WindowObject,
- WA_ScreenTitle,nsscreentitle,
- WA_Title,messages_get("LocalHistory"),
- WA_Activate, TRUE,
- WA_DepthGadget, TRUE,
- WA_DragBar, TRUE,
- WA_CloseGadget, TRUE,
- WA_SizeGadget, TRUE,
- WA_CustomScreen,scrn,
- WINDOW_SharedPort,sport,
- WINDOW_UserData,hwindow,
- WINDOW_IconifyGadget, FALSE,
- WINDOW_Position, WPOS_CENTERSCREEN,
- WA_ReportMouse,TRUE,
- WA_IDCMP,IDCMP_MOUSEBUTTONS | IDCMP_NEWSIZE | IDCMP_MOUSEMOVE,
- WINDOW_ParentGroup, VGroupObject,
- LAYOUT_AddChild, hwindow->gadgets[GID_BROWSER] = SpaceObject,
- GA_ID,GID_BROWSER,
- SPACE_MinWidth,width,
- SPACE_MinHeight,height,
- SpaceEnd,
- EndGroup,
- EndWindow;
-
- hwindow->win = (struct Window *)RA_OpenWindow(hwindow->objects[OID_MAIN]);
-// hwindow->bw->window = hwindow;
- hwindow->node = AddObject(window_list,AMINS_HISTORYWINDOW);
- hwindow->node->objstruct = hwindow;
+ if(!hwindow)
+ {
+ hwindow = AllocVec(sizeof(struct history_window),MEMF_CLEAR | MEMF_PRIVATE);
+
+ hwindow->bw = bw;
+ history_size(history, &width, &height);
+
+ hwindow->objects[OID_MAIN] = WindowObject,
+ WA_ScreenTitle,nsscreentitle,
+ WA_Title,messages_get("History"),
+ WA_Activate, TRUE,
+ WA_DepthGadget, TRUE,
+ WA_DragBar, TRUE,
+ WA_CloseGadget, TRUE,
+ WA_SizeGadget, TRUE,
+ WA_CustomScreen,scrn,
+ WA_InnerWidth,width,
+ WA_InnerHeight,height,
+ WINDOW_SharedPort,sport,
+ WINDOW_UserData,hwindow,
+ WINDOW_IconifyGadget, FALSE,
+ WINDOW_Position, WPOS_CENTERSCREEN,
+ WA_ReportMouse,TRUE,
+ WA_IDCMP,IDCMP_MOUSEBUTTONS | IDCMP_NEWSIZE, // | IDCMP_MOUSEMOVE,
+ WINDOW_ParentGroup, VGroupObject,
+ LAYOUT_AddChild, hwindow->gadgets[GID_BROWSER] = SpaceObject,
+ GA_ID,GID_BROWSER,
+// SPACE_MinWidth,width,
+// SPACE_MinHeight,height,
+ SpaceEnd,
+ EndGroup,
+ EndWindow;
+
+ hwindow->win = (struct Window *)RA_OpenWindow(hwindow->objects[OID_MAIN]);
+// hwindow->bw->window = hwindow;
+ hwindow->node = AddObject(window_list,AMINS_HISTORYWINDOW);
+ hwindow->node->objstruct = hwindow;
+ }
+
+ hwindow->bw = bw;
ami_history_redraw(hwindow);
}
@@ -117,9 +118,15 @@ void ami_history_open(struct browser_window *bw, struct history *history)
void ami_history_redraw(struct history_window *hw)
{
- currp = hw->win->RPort;
+ struct IBox *bbox;
+
+ GetAttr(SPACE_AreaBox,hw->gadgets[GID_BROWSER],(ULONG *)&bbox);
+ ami_clg(0xffffff);
+
history_redraw(history_current);
- currp = NULL;
+
+ ami_clearclipreg(currp);
+ BltBitMapRastPort(glob.bm,0,0,hw->win->RPort,bbox->Left,bbox->Top,bbox->Width,bbox->Height,0x0C0);
}
/**
@@ -128,12 +135,39 @@ void ami_history_redraw(struct history_window *hw)
* \return true if the event was handled, false to pass it on
*/
-bool ami_history_click(int xpos,int ypos)
+bool ami_history_click(struct history_window *hw,uint16 code)
{
int x, y;
+ struct IBox *bbox;
+ ULONG width,height;
+
+ GetAttr(SPACE_AreaBox,hw->gadgets[GID_BROWSER],(ULONG *)&bbox);
+
+// GetAttr(SCROLLER_Top,gwin->objects[OID_HSCROLL],(ULONG *)&xs);
+ x = hw->win->MouseX - bbox->Left; // +xs;
+// GetAttr(SCROLLER_Top,gwin->objects[OID_VSCROLL],(ULONG *)&ys);
+ y = hw->win->MouseY - bbox->Top; // + ys;
- history_click(history_bw, history_current, xpos, ypos,0);
-// pointer->buttons == wimp_CLICK_ADJUST);
+ width=bbox->Width;
+ height=bbox->Height;
+
+ if((x>=0) && (y>=0) && (x<width) && (y<height))
+ {
+ switch(code)
+ {
+ case SELECTUP:
+ history_click(hw->bw,history_current,x,y,false);
+ ami_history_redraw(hw);
+ ami_do_redraw(hw->bw->window->shared,false);
+ break;
+
+ case MIDDLEUP:
+ history_click(hw->bw,history_current,x,y,true);
+ ami_history_redraw(hw);
+ break;
+
+ }
+ }
return true;
}
@@ -172,6 +206,10 @@ BOOL ami_history_event(struct history_window *hw)
ami_history_redraw(hw);
break;
+ case WMHI_MOUSEBUTTONS:
+ ami_history_click(hw,code);
+ break;
+
case WMHI_CLOSEWINDOW:
ami_history_close(hw);
return TRUE;
diff --git a/amiga/menu.c b/amiga/menu.c
index bdd781844..2788ea5db 100755
--- a/amiga/menu.c
+++ b/amiga/menu.c
@@ -92,7 +92,7 @@ void ami_init_menulabs(void)
menulab[22] = ami_utf8_easy((char *)messages_get("FindTextNS"));
menulab[23] = NM_BARLABEL;
menulab[24] = ami_utf8_easy((char *)messages_get("normal"));
- menulab[25] = ami_utf8_easy((char *)messages_get("HistLocal"));
+ menulab[25] = ami_utf8_easy((char *)messages_get("HistLocalNS"));
menulab[26] = ami_utf8_easy((char *)messages_get("HistGlobalNS"));
menulab[27] = NM_BARLABEL;
menulab[28] = ami_utf8_easy((char *)messages_get("ShowCookies"));
@@ -137,8 +137,8 @@ struct NewMenu *ami_create_menu(ULONG type)
{ NM_ITEM,0,"Z",0,0,0,}, // clear selection
{NM_TITLE,0,0,0,0,0,}, // browser
{ NM_ITEM,0,"F",0,0,0,}, // find in page
- {NM_IGNORE,0,0,0,0,0,}, // size
{ NM_ITEM,NM_BARLABEL,0,0,0,0,},
+ {NM_IGNORE,0,0,0,0,0,}, // was test option for scaling
{ NM_ITEM,0,0,0,0,0,}, // local history
{ NM_ITEM,0,0,0,0,0,}, // global history
{ NM_ITEM,NM_BARLABEL,0,0,0,0,},