diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2014-11-16 14:06:12 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2014-11-16 14:06:12 +0000 |
commit | e75cdeeefd501bf10bed2cc8df9efae2431824ec (patch) | |
tree | a8d14b05f322b33f1635b5703d478579b16d67f7 | |
parent | 1deb36759bfaa70cf930ac8017aad49a990f06d4 (diff) | |
download | netsurf-e75cdeeefd501bf10bed2cc8df9efae2431824ec.tar.gz netsurf-e75cdeeefd501bf10bed2cc8df9efae2431824ec.tar.bz2 |
Don't make the app id a global var
-rw-r--r-- | amiga/download.c | 2 | ||||
-rw-r--r-- | amiga/gui.c | 7 | ||||
-rwxr-xr-x | amiga/gui.h | 8 |
3 files changed, 15 insertions, 2 deletions
diff --git a/amiga/download.c b/amiga/download.c index d7a5056bf..fd45a87b9 100644 --- a/amiga/download.c +++ b/amiga/download.c @@ -241,7 +241,7 @@ static void gui_download_window_done(struct gui_download_window *dw) if((nsoption_bool(download_notify)) && (dw->result == AMINS_DLOAD_OK)) { - Notify(ami_appid, APPNOTIFY_Title, messages_get("amiDownloadComplete"), + Notify(ami_gui_get_app_id(), APPNOTIFY_Title, messages_get("amiDownloadComplete"), APPNOTIFY_PubScreenName, "FRONT", APPNOTIFY_BackMsg, dw->fname, APPNOTIFY_CloseOnDC, TRUE, diff --git a/amiga/gui.c b/amiga/gui.c index 5bdee8649..dc9df9ed1 100644 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -178,6 +178,7 @@ ULONG sz_gad_height = 0; struct MsgPort *applibport = NULL; ULONG applibsig = 0; +uint32 ami_appid = 0; struct Hook newprefs_hook; STRPTR temp_homepage_url = NULL; @@ -5233,6 +5234,12 @@ static void gui_file_gadget_open(struct gui_window *g, hlcache_handle *hl, } } +/* exported function documented in amiga/gui.h */ +uint32 ami_gui_get_app_id(void) +{ + return ami_appid; +} + static struct gui_window_table amiga_window_table = { .create = gui_window_create, .destroy = gui_window_destroy, diff --git a/amiga/gui.h b/amiga/gui.h index 899729cae..2ab860abe 100755 --- a/amiga/gui.h +++ b/amiga/gui.h @@ -187,6 +187,13 @@ nserror ami_gui_get_space_box(Object *obj, struct IBox **bbox); */ void ami_gui_free_space_box(struct IBox *bbox); +/** + * Get the application.library ID NetSurf is registered as. + * + * @return App ID. + */ +uint32 ami_gui_get_app_id(void); + struct TextFont *origrpfont; struct MinList *window_list; struct Screen *scrn; @@ -195,7 +202,6 @@ struct MsgPort *sport; bool win_destroyed; struct browser_window *curbw; struct gui_globals browserglob; -uint32 ami_appid; BOOL ami_autoscroll; BOOL popupmenu_lib_ok; #endif |