mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-24 13:06:49 +03:00
Config to enable external hotlist app to be launched via toolbar and menus.
svn path=/trunk/netsurf/; revision=13150
This commit is contained in:
parent
dfcd555a0e
commit
78181f7d4e
@ -197,6 +197,23 @@ void ro_gui_hotlist_postinitialise(void)
|
||||
|
||||
void ro_gui_hotlist_open(void)
|
||||
{
|
||||
os_error *error;
|
||||
char command[2048];
|
||||
|
||||
if (option_external_hotlists && option_external_hotlist_app != NULL &&
|
||||
*option_external_hotlist_app != '\0') {
|
||||
snprintf(command, sizeof(command), "Filer_Run %s",
|
||||
option_external_hotlist_app);
|
||||
error = xos_cli(command);
|
||||
|
||||
if (error == NULL)
|
||||
return;
|
||||
|
||||
LOG(("xos_cli: 0x%x: %s", error->errnum, error->errmess));
|
||||
warn_user("Failed to launch external hotlist: %s",
|
||||
error->errmess);
|
||||
}
|
||||
|
||||
tree_set_redraw(ro_treeview_get_tree(hotlist_window.tv), true);
|
||||
|
||||
ro_gui_hotlist_toolbar_update_buttons();
|
||||
|
@ -65,6 +65,7 @@ extern char *option_theme_save;
|
||||
extern bool option_thumbnail_iconise;
|
||||
extern bool option_interactive_help;
|
||||
extern bool option_external_hotlists;
|
||||
extern char *option_external_hotlist_app;
|
||||
|
||||
#define EXTRA_OPTION_DEFINE \
|
||||
bool option_use_mouse_gestures = false;\
|
||||
@ -103,7 +104,8 @@ char *option_theme_path = 0; \
|
||||
char *option_theme_save = 0; \
|
||||
bool option_thumbnail_iconise = true; \
|
||||
bool option_interactive_help = true; \
|
||||
bool option_external_hotlists = false;
|
||||
bool option_external_hotlists = false; \
|
||||
char *option_external_hotlist_app = 0;
|
||||
|
||||
#define EXTRA_OPTION_TABLE \
|
||||
{ "use_mouse_gestures", OPTION_BOOL, &option_use_mouse_gestures },\
|
||||
@ -142,6 +144,7 @@ bool option_external_hotlists = false;
|
||||
{ "theme_save", OPTION_STRING, &option_theme_save }, \
|
||||
{ "thumbnail_iconise", OPTION_BOOL, &option_thumbnail_iconise }, \
|
||||
{ "interactive_help", OPTION_BOOL, &option_interactive_help }, \
|
||||
{ "external_hotlists", OPTION_BOOL, &option_external_hotlists }
|
||||
{ "external_hotlists", OPTION_BOOL, &option_external_hotlists }, \
|
||||
{ "external_hotlist_app", OPTION_STRING, &option_external_hotlist_app }
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user