get the window title from a gui_window

This commit is contained in:
Chris Young 2019-05-08 00:35:09 +01:00
parent 1edf8f2848
commit a5aa53657c
3 changed files with 13 additions and 1 deletions

View File

@ -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
{

View File

@ -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);

View File

@ -287,6 +287,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
*/