summaryrefslogtreecommitdiff
path: root/amiga
diff options
context:
space:
mode:
Diffstat (limited to 'amiga')
-rwxr-xr-xamiga/context_menu.c2
-rwxr-xr-xamiga/gui.c30
-rwxr-xr-xamiga/gui_options.c18
-rw-r--r--amiga/options.h5
4 files changed, 19 insertions, 36 deletions
diff --git a/amiga/context_menu.c b/amiga/context_menu.c
index 92ba1598d..5b02bc0c2 100755
--- a/amiga/context_menu.c
+++ b/amiga/context_menu.c
@@ -173,6 +173,7 @@ void ami_context_menu_show(struct gui_window_2 *gwin,int x,int y)
int box_y=0;
bool menuhascontent = false;
bool no_url = true, no_obj = true, no_sel = true;
+ ULONG ret = 0;
if(!cc) return;
if(content_get_type(cc) != CONTENT_HTML) return;
@@ -408,6 +409,7 @@ void ami_context_menu_show(struct gui_window_2 *gwin,int x,int y)
if(!menuhascontent) return;
gui_window_set_pointer(gwin->bw->window,GUI_POINTER_DEFAULT);
+
IDoMethod(ctxmenuobj,PM_OPEN,gwin->win);
}
diff --git a/amiga/gui.c b/amiga/gui.c
index ad6d419a5..e767b415f 100755
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -147,7 +147,6 @@ Class *urlStringClass;
BOOL locked_screen = FALSE;
BOOL screen_closed = FALSE;
-ULONG screen_signal = -1;
struct MsgPort *applibport = NULL;
ULONG applibsig = 0;
@@ -308,8 +307,6 @@ void ami_open_resources(void)
ASLFR_RejectIcons,TRUE,
ASLFR_InitialDrawer,option_download_dir,
TAG_DONE);
-
- screen_signal = AllocSignal(-1);
}
void ami_set_options(void)
@@ -540,7 +537,6 @@ void ami_openscreen(void)
SA_Type, PUBLICSCREEN,
SA_PubName, "NetSurf",
SA_LikeWorkbench, TRUE,
- SA_PubSig, screen_signal,
TAG_DONE);
if(scrn)
@@ -1201,13 +1197,7 @@ void ami_handle_msg(void)
switch(code)
{
case MENUDOWN:
- if(!option_sticky_context_menu)
- ami_context_menu_show(gwin,x,y);
- break;
-
- case MENUUP:
- if(option_sticky_context_menu)
- ami_context_menu_show(gwin,x,y);
+ ami_context_menu_show(gwin,x,y);
break;
case SELECTUP:
@@ -2138,14 +2128,27 @@ void ami_quit_netsurf(void)
void ami_gui_close_screen(struct Screen *scrn)
{
+ ULONG screen_signal = AllocSignal(-1);
ULONG scrnsig = 1 << screen_signal;
- if(scrn == NULL) return;
- if(CloseScreen(scrn)) return;
+ SetScreenAttr(scrn, SA_PubSig, screen_signal, sizeof(ULONG));
+
+ if(scrn == NULL)
+ {
+ FreeSignal(screen_signal);
+ return;
+ }
+
+ if(CloseScreen(scrn))
+ {
+ FreeSignal(screen_signal);
+ return;
+ }
LOG(("Waiting for visitor windows to close..."));
Wait(scrnsig);
CloseScreen(scrn);
+ FreeSignal(screen_signal);
}
void gui_quit(void)
@@ -2173,7 +2176,6 @@ void gui_quit(void)
/* If it is our public screen, close it or wait until the visitor windows leave */
if(locked_screen == FALSE) ami_gui_close_screen(scrn);
- FreeSignal(screen_signal);
FreeVec(nsscreentitle);
diff --git a/amiga/gui_options.c b/amiga/gui_options.c
index 0f453439f..0c64c9baf 100755
--- a/amiga/gui_options.c
+++ b/amiga/gui_options.c
@@ -118,7 +118,6 @@ enum
GID_OPTS_SEARCH_PROV,
GID_OPTS_CLIPBOARD,
GID_OPTS_CMENU_ENABLE,
- GID_OPTS_CMENU_STICKY,
GID_OPTS_STARTUP_NO_WIN,
GID_OPTS_CLOSE_NO_QUIT,
GID_OPTS_DOCKY,
@@ -285,7 +284,6 @@ void ami_gui_opts_setup(void)
gadlab[GID_OPTS_SEARCH_PROV] = (char *)ami_utf8_easy((char *)messages_get("SearchProvider"));
gadlab[GID_OPTS_CLIPBOARD] = (char *)ami_utf8_easy((char *)messages_get("ClipboardUTF8"));
gadlab[GID_OPTS_CMENU_ENABLE] = (char *)ami_utf8_easy((char *)messages_get("Enable"));
- gadlab[GID_OPTS_CMENU_STICKY] = (char *)ami_utf8_easy((char *)messages_get("Sticky"));
gadlab[GID_OPTS_STARTUP_NO_WIN] = (char *)ami_utf8_easy((char *)messages_get("OptionNoWindow"));
gadlab[GID_OPTS_CLOSE_NO_QUIT] = (char *)ami_utf8_easy((char *)messages_get("OptionNoQuit"));
gadlab[GID_OPTS_DOCKY] = (char *)ami_utf8_easy((char *)messages_get("OptionDocky"));
@@ -1137,13 +1135,6 @@ void ami_gui_opts_open(void)
GA_Text, gadlab[GID_OPTS_CMENU_ENABLE],
GA_Selected, option_context_menu,
CheckBoxEnd,
- LAYOUT_AddChild, gow->objects[GID_OPTS_CMENU_STICKY] = CheckBoxObject,
- GA_ID, GID_OPTS_CMENU_STICKY,
- GA_RelVerify, TRUE,
- GA_Disabled, !option_context_menu,
- GA_Text, gadlab[GID_OPTS_CMENU_STICKY],
- GA_Selected, option_sticky_context_menu,
- CheckBoxEnd,
LayoutEnd, // context menus
CHILD_WeightedHeight, 0,
LayoutEnd, // temp extra group for spacing
@@ -1594,10 +1585,6 @@ void ami_gui_opts_use(void)
if(data) option_context_menu = true;
else option_context_menu = false;
- GetAttr(GA_Selected,gow->objects[GID_OPTS_CMENU_STICKY],(ULONG *)&data);
- if(data) option_sticky_context_menu = true;
- else option_sticky_context_menu = false;
-
GetAttr(GA_Selected,gow->objects[GID_OPTS_STARTUP_NO_WIN],(ULONG *)&data);
if(data) option_startup_no_window = true;
else option_startup_no_window = false;
@@ -1829,11 +1816,6 @@ BOOL ami_gui_opts_event(void)
IDoMethod(gow->objects[GID_OPTS_DLDIR],
GFILE_REQUEST,gow->win);
break;
-
- case GID_OPTS_CMENU_ENABLE:
- RefreshSetGadgetAttrs((struct Gadget *)gow->objects[GID_OPTS_CMENU_STICKY],
- gow->win, NULL, GA_Disabled, !code, TAG_DONE);
- break;
}
break;
}
diff --git a/amiga/options.h b/amiga/options.h
index 97c69f76e..6f7289c6d 100644
--- a/amiga/options.h
+++ b/amiga/options.h
@@ -28,7 +28,6 @@ extern int option_cache_bitmaps;
extern char *option_theme;
extern bool option_utf8_clipboard;
extern bool option_context_menu;
-extern bool option_sticky_context_menu;
extern bool option_truecolour_mouse_pointers;
extern bool option_use_os_pointers;
extern bool option_new_tab_active;
@@ -76,8 +75,7 @@ char *option_modeid = 0; \
int option_cache_bitmaps = 0; \
char *option_theme = 0; \
bool option_utf8_clipboard = false; \
-bool option_context_menu = false; \
-bool option_sticky_context_menu = false; \
+bool option_context_menu = true; \
bool option_truecolour_mouse_pointers = false; \
bool option_use_os_pointers = true; \
bool option_new_tab_active = false; \
@@ -126,7 +124,6 @@ bool option_widescreen = false; \
{ "theme", OPTION_STRING, &option_theme}, \
{ "clipboard_write_utf8", OPTION_BOOL, &option_utf8_clipboard}, \
{ "context_menu", OPTION_BOOL, &option_context_menu}, \
-{ "sticky_context_menu", OPTION_BOOL, &option_sticky_context_menu}, \
{ "truecolour_mouse_pointers", OPTION_BOOL, &option_truecolour_mouse_pointers}, \
{ "os_mouse_pointers", OPTION_BOOL, &option_use_os_pointers}, \
{ "new_tab_is_active", OPTION_BOOL, &option_new_tab_active}, \