diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-01-22 23:19:57 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-01-23 00:00:18 +0000 |
commit | 047569339406f2be1637ae4cee5dd0c9a9c2328f (patch) | |
tree | 3d3909b4bc3d27cd7a9e146d32539ce752b33310 /beos | |
parent | 4684e9665d2ddff50f4a8e9a16d73224d2617180 (diff) | |
download | netsurf-047569339406f2be1637ae4cee5dd0c9a9c2328f.tar.gz netsurf-047569339406f2be1637ae4cee5dd0c9a9c2328f.tar.bz2 |
create table for fetcher operations and move all operations into it
Diffstat (limited to 'beos')
-rw-r--r-- | beos/filetype.cpp | 6 | ||||
-rw-r--r-- | beos/filetype.h | 1 | ||||
-rw-r--r-- | beos/gui.cpp | 17 |
3 files changed, 13 insertions, 11 deletions
diff --git a/beos/filetype.cpp b/beos/filetype.cpp index 7975041ac..d5bd3d77b 100644 --- a/beos/filetype.cpp +++ b/beos/filetype.cpp @@ -135,9 +135,3 @@ const char *fetch_filetype(const char *unix_path) return type; } - -char *fetch_mimetype(const char *unix_path) -{ - return strdup(fetch_filetype(unix_path)); -} - diff --git a/beos/filetype.h b/beos/filetype.h index ab0ef410f..72252dbd0 100644 --- a/beos/filetype.h +++ b/beos/filetype.h @@ -18,3 +18,4 @@ void beos_fetch_filetype_init(void); void beos_fetch_filetype_fin(void); +const char *fetch_filetype(const char *unix_path); diff --git a/beos/gui.cpp b/beos/gui.cpp index feac53a29..ca176c83f 100644 --- a/beos/gui.cpp +++ b/beos/gui.cpp @@ -1067,13 +1067,18 @@ static struct gui_clipboard_table beos_clipboard_table = { gui_set_clipboard, }; +static struct gui_fetch_table beos_fetch_table = { + filename_from_path, + path_add_part, + fetch_filetype, + gui_get_resource_url, + NULL //fetch_mimetype +}; + static struct gui_browser_table beos_browser_table = { gui_poll, - filename_from_path, - path_add_part, gui_quit, NULL, //set_search_ico - gui_get_resource_url, gui_launch_url, NULL, //create_form_select_menu NULL, //cert_verify @@ -1090,7 +1095,8 @@ int main(int argc, char** argv) &beos_browser_table, beos_window_table, beos_download_table, - &beos_clipboard_table + &beos_clipboard_table, + &beos_fetch_table }; if (find_directory(B_USER_SETTINGS_DIRECTORY, &options, true) == B_OK) { @@ -1141,7 +1147,8 @@ int gui_init_replicant(int argc, char** argv) &beos_browser_table, beos_window_table, beos_download_table, - &beos_clipboard_table + &beos_clipboard_table, + &beos_fetch_table }; if (find_directory(B_USER_SETTINGS_DIRECTORY, &options, true) == B_OK) { |