mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-19 04:06:21 +00:00
feat(api): add get_current_window call
Add prof_get_current_window API to retrieve the title of the currently active window, matching the titlebar display. The feature is especially useful to track currently used plugin window.
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
#include "plugins/settings.h"
|
||||
#include "plugins/disco.h"
|
||||
#include "ui/ui.h"
|
||||
#include "ui/win_types.h"
|
||||
#include "ui/window_list.h"
|
||||
#include "xmpp/roster_list.h"
|
||||
|
||||
@@ -205,6 +206,13 @@ api_get_current_recipient(void)
|
||||
}
|
||||
}
|
||||
|
||||
gchar*
|
||||
api_get_current_window(void)
|
||||
{
|
||||
ProfWin* current = wins_get_current();
|
||||
return win_get_title(current);
|
||||
}
|
||||
|
||||
char*
|
||||
api_get_current_muc(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user