mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 04:26:50 +03:00
Update RISC OS hotlist to use core window interface
This commit is contained in:
parent
05a35725d1
commit
af3a78060f
@ -184,7 +184,7 @@ void ro_gui_dialog_init(void)
|
||||
ro_gui_cert_preinitialise();
|
||||
|
||||
/* hotlist window */
|
||||
ro_gui_hotlist_preinitialise();
|
||||
ro_gui_hotlist_initialise();
|
||||
|
||||
/* global history window */
|
||||
ro_gui_global_history_preinitialise();
|
||||
|
@ -1271,9 +1271,6 @@ static nserror gui_init(int argc, char** argv)
|
||||
/* certificate verification window */
|
||||
ro_gui_cert_postinitialise();
|
||||
|
||||
/* hotlist window */
|
||||
ro_gui_hotlist_postinitialise();
|
||||
|
||||
/* global history window */
|
||||
ro_gui_global_history_postinitialise();
|
||||
|
||||
@ -1565,7 +1562,7 @@ static void gui_quit(void)
|
||||
urldb_save(nsoption_charp(url_save));
|
||||
ro_gui_window_quit();
|
||||
ro_gui_global_history_destroy();
|
||||
ro_gui_hotlist_destroy();
|
||||
ro_gui_hotlist_finalise();
|
||||
ro_gui_cookies_finalise();
|
||||
ro_gui_saveas_quit();
|
||||
ro_gui_url_bar_fini();
|
||||
|
@ -103,14 +103,6 @@ static const struct button_bar_buttons global_history_toolbar_buttons[] = {
|
||||
{NULL, TOOLBAR_BUTTON_NONE, TOOLBAR_BUTTON_NONE, '\0', ""}
|
||||
};
|
||||
|
||||
static const struct button_bar_buttons hotlist_toolbar_buttons[] = {
|
||||
{"delete", TOOLBAR_BUTTON_DELETE, TOOLBAR_BUTTON_NONE, '0', "0"},
|
||||
{"expand", TOOLBAR_BUTTON_EXPAND, TOOLBAR_BUTTON_COLLAPSE, '1', "1"},
|
||||
{"open", TOOLBAR_BUTTON_OPEN, TOOLBAR_BUTTON_CLOSE, '2', "2"},
|
||||
{"launch", TOOLBAR_BUTTON_LAUNCH, TOOLBAR_BUTTON_NONE, '3', "3"},
|
||||
{"create", TOOLBAR_BUTTON_CREATE, TOOLBAR_BUTTON_NONE, '4', "4"},
|
||||
{NULL, TOOLBAR_BUTTON_NONE, TOOLBAR_BUTTON_NONE, '\0', ""}
|
||||
};
|
||||
|
||||
struct button_bar;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -34,20 +34,65 @@
|
||||
#define message_HOTLIST_CHANGED 0x4af82
|
||||
#endif
|
||||
|
||||
#include "riscos/menus.h"
|
||||
|
||||
struct nsurl;
|
||||
|
||||
void ro_gui_hotlist_preinitialise(void);
|
||||
void ro_gui_hotlist_postinitialise(void);
|
||||
void ro_gui_hotlist_destroy(void);
|
||||
void ro_gui_hotlist_open(void);
|
||||
void ro_gui_hotlist_save(void);
|
||||
/**
|
||||
* initialise the hotlist window template ready for subsequent use.
|
||||
*/
|
||||
void ro_gui_hotlist_initialise(void);
|
||||
|
||||
/**
|
||||
* make the cookie window visible.
|
||||
*
|
||||
* \return NSERROR_OK on success else appropriate error code on faliure.
|
||||
*/
|
||||
nserror ro_gui_hotlist_present(void);
|
||||
|
||||
/**
|
||||
* Free any resources allocated for the cookie window.
|
||||
*
|
||||
* \return NSERROR_OK on success else appropriate error code on faliure.
|
||||
*/
|
||||
nserror ro_gui_hotlist_finalise(void);
|
||||
|
||||
bool ro_gui_hotlist_check_window(wimp_w window);
|
||||
bool ro_gui_hotlist_check_menu(wimp_menu *menu);
|
||||
|
||||
/**
|
||||
* Add a URL to the hotlist.
|
||||
*
|
||||
* This will be passed on to the core hotlist, then
|
||||
* Message_HotlistAddURL will broadcast to any bookmark applications
|
||||
* via the Hotlist Protocol.
|
||||
*
|
||||
* \param *url The URL to be added.
|
||||
*/
|
||||
void ro_gui_hotlist_add_page(struct nsurl *url);
|
||||
|
||||
/**
|
||||
* Clean up RMA storage used by the Message_HotlistAddURL protocol.
|
||||
*/
|
||||
void ro_gui_hotlist_add_cleanup(void);
|
||||
|
||||
/**
|
||||
* Remove a URL from the hotlist.
|
||||
*
|
||||
* This will be passed on to the core hotlist, unless we're configured
|
||||
* to use external hotlists in which case we ignore it.
|
||||
*
|
||||
* \param *url The URL to be removed.
|
||||
*/
|
||||
void ro_gui_hotlist_remove_page(struct nsurl *url);
|
||||
|
||||
/**
|
||||
* Report whether the hotlist contains a given URL.
|
||||
*
|
||||
* This will be passed on to the core hotlist, unless we're configured
|
||||
* to use an external hotlist in which case we always report false.
|
||||
*
|
||||
* \param url The URL to be tested.
|
||||
* \return true if the hotlist contains the URL; else false.
|
||||
*/
|
||||
bool ro_gui_hotlist_has_page(struct nsurl *url);
|
||||
|
||||
#endif
|
||||
|
@ -150,8 +150,9 @@ bool ro_gui_iconbar_click(wimp_pointer *pointer)
|
||||
|
||||
case wimp_CLICK_ADJUST:
|
||||
xosbyte1(osbyte_SCAN_KEYBOARD, 0 ^ 0x80, 0, &key_down);
|
||||
if (key_down == 0)
|
||||
ro_gui_hotlist_open();
|
||||
if (key_down == 0) {
|
||||
ro_gui_hotlist_present();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -224,7 +225,7 @@ bool ro_gui_iconbar_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
|
||||
ro_gui_dialog_open_persistent(NULL, dialog_openurl, true);
|
||||
return true;
|
||||
case HOTLIST_SHOW:
|
||||
ro_gui_hotlist_open();
|
||||
ro_gui_hotlist_present();
|
||||
return true;
|
||||
case HISTORY_SHOW_GLOBAL:
|
||||
ro_gui_global_history_open();
|
||||
|
@ -1944,7 +1944,7 @@ bool ro_gui_window_handle_local_keypress(struct gui_window *g, wimp_key *key,
|
||||
return true;
|
||||
|
||||
case IS_WIMP_KEY + wimp_KEY_F6: /* Hotlist */
|
||||
ro_gui_hotlist_open();
|
||||
ro_gui_hotlist_present();
|
||||
return true;
|
||||
|
||||
case IS_WIMP_KEY + wimp_KEY_F7: /* Show local history */
|
||||
@ -2704,7 +2704,7 @@ bool ro_gui_window_menu_select(wimp_w w, wimp_i i, wimp_menu *menu,
|
||||
ro_gui_window_action_add_bookmark(g);
|
||||
break;
|
||||
case HOTLIST_SHOW:
|
||||
ro_gui_hotlist_open();
|
||||
ro_gui_hotlist_present();
|
||||
break;
|
||||
|
||||
/* cookies actions */
|
||||
@ -3623,7 +3623,7 @@ void ro_gui_window_toolbar_click(void *data,
|
||||
break;
|
||||
|
||||
case TOOLBAR_BUTTON_BOOKMARK_OPEN:
|
||||
ro_gui_hotlist_open();
|
||||
ro_gui_hotlist_present();
|
||||
break;
|
||||
|
||||
case TOOLBAR_BUTTON_BOOKMARK_ADD:
|
||||
|
Loading…
Reference in New Issue
Block a user