summaryrefslogtreecommitdiff
path: root/frontends
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2019-05-08 00:35:09 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2019-05-08 00:35:09 +0100
commita5aa53657c6feaf8ddd29ee33f8d5e89138ec996 (patch)
treeb898520ba578958c66185f1993c359c1da768d91 /frontends
parent1edf8f28480fcb780dc6504022c65b6cc6c019cf (diff)
downloadnetsurf-a5aa53657c6feaf8ddd29ee33f8d5e89138ec996.tar.gz
netsurf-a5aa53657c6feaf8ddd29ee33f8d5e89138ec996.tar.bz2
get the window title from a gui_window
Diffstat (limited to 'frontends')
-rw-r--r--frontends/amiga/arexx.c2
-rw-r--r--frontends/amiga/gui.c7
-rw-r--r--frontends/amiga/gui.h5
3 files changed, 13 insertions, 1 deletions
diff --git a/frontends/amiga/arexx.c b/frontends/amiga/arexx.c
index 6d1bdf12b..5b5f0ea09 100644
--- a/frontends/amiga/arexx.c
+++ b/frontends/amiga/arexx.c
@@ -421,7 +421,7 @@ RXHOOKF(rx_gettitle)
if(ami_gui_get_gui_window_2(gw)->tabs > 1)
strcpy(result, ami_gui_get_tab_title(gw));
else
- strcpy(result, ami_gui_get_gui_window_2(gw)->wintitle);
+ strcpy(result, ami_gui_get_win_title(gw));
}
else
{
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index e9ceb1a6e..3920616e3 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -320,6 +320,13 @@ struct gui_window *ami_gui2_get_gui_window(struct gui_window_2 *gwin)
return gwin->gw;
}
+const char *ami_gui_get_win_title(struct gui_window *gw)
+{
+ assert(gw != NULL);
+ assert(gw->shared != NULL);
+ return (const char *)gw->shared->wintitle;
+}
+
const char *ami_gui_get_tab_title(struct gui_window *gw)
{
assert(gw != NULL);
diff --git a/frontends/amiga/gui.h b/frontends/amiga/gui.h
index e16390147..e1042c517 100644
--- a/frontends/amiga/gui.h
+++ b/frontends/amiga/gui.h
@@ -288,6 +288,11 @@ struct List *ami_gui_get_download_list(struct gui_window *gw);
const char *ami_gui_get_tab_title(struct gui_window *gw);
/**
+ * Get window title from gui_window
+ */
+const char *ami_gui_get_win_title(struct gui_window *gw);
+
+/**
* Get tab node from gui_window
*/
struct Node *ami_gui_get_tab_node(struct gui_window *gw);