* Add new function: document_update_tags().
* Refactor the various tag update functions into document_update_tags().
* Remove extra call to update the tags in document_new_file().
This prevents losing the label edit input dialog below the build command
dialog which can be confusing since it prevents the build command dialog
from accepting input even though it's on-top of the (potentially hidden)
label edit input dialog.
Uninitialised GValue does not always work, but is an opaque type so
structure of initialiser isn't known. Glib 2.30 on has G_VALUE_INIT
to use as initial value. Fix so if not defined give it the previous literal
value { 0 }, although this leaves the warning, so it is not initialising
the GValue correctly but enough to work.
Fix warnings that appeared with GCC 4.6
js.c:1067:10: warning: variable ‘is_prototype’ set but not used
dialogs.c:173:2: warning: missing initializer
dialogs.c:173:2: warning: (near initialization for ‘value.data’)
sidebar.c:534:17: warning: unused variable ‘doc’
This prevents GTK of trying to fetch the necessary information like
MIME-type itself, which leads to a significant speedup (> 30%), as
well as using the real MIME-type we use rather than the GIO-guessed
one.
This function was only used from document_create() and most of this code is
not needed since the memset() and g_new0() calls set the memory to all 0's,
which in this case should suffice to (re)set all the members to 0/NULL/FALSE.
Refactor so all the resetting to defaults code is done in remove_page()
only and then only do the required non-FALSE/NULL initialization in
document_create().
Move the remove_page() prototype to the top of the file and various other
minor changes in remove_page().
It was used only in one place in document_update_type_keywords() which
already did a similar check using the file type before calling this function.
Update HACKING file and very minor cleanup of other code in
document_update_type_keywords().
Previously an error message was shown if doc->file_name is NULL.
The Save As dialog is now shown if the document does not have an
absolute path. This is because the user should confirm where to save
the document in this case.
Although this changes plugin API behaviour, it seems the best way to
ensure the Save As dialog is always shown when needed so the user
knows where the document has been saved.
Fix correctly checking result of editor_lexer_get_type_keyword_idx().
Do not check IS_SCINTILLA unnecessarily (this is covered by DOC_VALID).
Do not use G_[UN]LIKELY macros as this complicates code without any
real benefit (unless in a tight loop).
This makes the code more readable, potentially more future-proof (if
the actual string changes) and better style (catches possible typos at
build-time).
Use two spaces instead of tabs, spaces between function and opening
argument bracket, and various minor changes.
Add dummy gpointer to private struct so the class can be compiled
without modification.
This way, Geany's standard out and error can be read if started in verbose
mode until a key is pressed which makes debugging of command line
actions easier.
Fixes bug #3425969. Replace Geany escaping of session filepaths
with g_uri_escape_string (available now in 2.16) allowing any
punctuation characters in the path.