Skip to content

Commit

Permalink
persistent-temp-files-plugin: (persistent-untitled-documents) added f…
Browse files Browse the repository at this point in the history
…unction to API
  • Loading branch information
LiquidCake committed Nov 24, 2024
1 parent 4c1191a commit c32c92f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/libmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,18 @@ gboolean main_is_realized(void)
}


/**
* Checks whether Geany is 'closing all' documents right now.
*
* @return @c TRUE if the Geany is 'closing all' documents right now or @c FALSE otherwise.
**/
GEANY_API_SYMBOL
gboolean geany_is_closing_all_documents(void)
{
return main_status.closing_all;
}


/**
* Initialises the gettext translation system.
* This is a convenience function to set up gettext for internationalisation support
Expand Down
2 changes: 2 additions & 0 deletions src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ void main_locale_init(const gchar *locale_dir, const gchar *gettext_package);

gboolean main_is_realized(void);

gboolean geany_is_closing_all_documents(void);


#ifdef GEANY_PRIVATE

Expand Down
2 changes: 1 addition & 1 deletion src/plugindata.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ G_BEGIN_DECLS
* @warning You should not test for values below 200 as previously
* @c GEANY_API_VERSION was defined as an enum value, not a macro.
*/
#define GEANY_API_VERSION 248
#define GEANY_API_VERSION 249

/* hack to have a different ABI when built with different GTK major versions
* because loading plugins linked to a different one leads to crashes.
Expand Down

0 comments on commit c32c92f

Please sign in to comment.