Branch: refs/heads/master Author: Nick Treleaven nick.treleaven@btinternet.com Committer: Nick Treleaven nick.treleaven@btinternet.com Date: Thu, 25 Sep 2014 10:45:49 UTC Commit: 9d669a72f74b9433b9ad8f40f1a1424c77f3172d https://github.com/geany/geany/commit/9d669a72f74b9433b9ad8f40f1a1424c77f317...
Log Message: ----------- API: Rename document_reload_file -> document_reload_force
New name is clearer against document_reload_prompt. Add deprecated alias.
Modified Paths: -------------- plugins/geanyfunctions.h src/document.c src/document.h src/plugindata.h src/plugins.c
Modified: plugins/geanyfunctions.h 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -52,8 +52,8 @@ geany_functions->p_document->document_open_files #define document_remove_page \ geany_functions->p_document->document_remove_page -#define document_reload_file \ - geany_functions->p_document->document_reload_file +#define document_reload_force \ + geany_functions->p_document->document_reload_force #define document_set_encoding \ geany_functions->p_document->document_set_encoding #define document_set_text_changed \
Modified: src/document.c 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -1417,7 +1417,7 @@ void document_open_files(const GSList *filenames, gboolean readonly, GeanyFilety * * @return @c TRUE if the document was actually reloaded or @c FALSE otherwise. **/ -gboolean document_reload_file(GeanyDocument *doc, const gchar *forced_enc) +gboolean document_reload_force(GeanyDocument *doc, const gchar *forced_enc) { gint pos = 0; GeanyDocument *new_doc; @@ -1458,7 +1458,7 @@ gboolean document_reload_prompt(GeanyDocument *doc, const gchar *forced_enc) _("Any unsaved changes will be lost."), _("Are you sure you want to reload '%s'?"), base_name)) { - result = document_reload_file(doc, forced_enc); + result = document_reload_force(doc, forced_enc); if (forced_enc != NULL) ui_update_statusbar(doc, -1); }
Modified: src/document.h 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -196,7 +196,7 @@ gboolean document_save_file_as(GeanyDocument *doc, const gchar *utf8_fname); GeanyDocument* document_open_file(const gchar *locale_filename, gboolean readonly, GeanyFiletype *ft, const gchar *forced_enc);
-gboolean document_reload_file(GeanyDocument *doc, const gchar *forced_enc); +gboolean document_reload_force(GeanyDocument *doc, const gchar *forced_enc);
gboolean document_reload_prompt(GeanyDocument *doc, const gchar *forced_enc);
Modified: src/plugindata.h 6 lines changed, 4 insertions(+), 2 deletions(-) =================================================================== @@ -58,7 +58,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 219 +#define GEANY_API_VERSION 220
/* hack to have a different ABI when built with GTK3 because loading GTK2-linked plugins * with GTK3-linked Geany leads to crash */ @@ -310,7 +310,7 @@ typedef struct DocumentFuncs void (*document_open_files) (const GSList *filenames, gboolean readonly, struct GeanyFiletype *ft, const gchar *forced_enc); gboolean (*document_remove_page) (guint page_num); - gboolean (*document_reload_file) (struct GeanyDocument *doc, const gchar *forced_enc); + gboolean (*document_reload_force) (struct GeanyDocument *doc, const gchar *forced_enc); void (*document_set_encoding) (struct GeanyDocument *doc, const gchar *new_encoding); void (*document_set_text_changed) (struct GeanyDocument *doc, gboolean changed); void (*document_set_filetype) (struct GeanyDocument *doc, struct GeanyFiletype *type); @@ -741,6 +741,8 @@ BuildFuncs; /* Deprecated aliases */ #ifndef GEANY_DISABLE_DEPRECATED
+#define document_reload_file document_reload_force + /** @deprecated - copy into your plugin code if needed. * @c NULL-safe way to get the index of @a doc_ptr in the documents array. */ #define DOC_IDX(doc_ptr) \
Modified: src/plugins.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -98,7 +98,7 @@ static DocumentFuncs doc_funcs = { &document_open_file, &document_open_files, &document_remove_page, - &document_reload_file, + &document_reload_force, &document_set_encoding, &document_set_text_changed, &document_set_filetype,
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).