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.
Remove type keywords caching function since it doesn't really speed up
anything and we don't care if the keywords change since they can/should
still be reloaded. This also prevents "leaking" a static GString once
when the application closes and saves a call to g_string_free() when the
type keywords have changed.
Rename document_update_highlighting() to document_update_type_keywords()
since no re-highlighting is needed when updating Scintilla keywords.
Scintilla highlights the new keywords automatically so this saves a call
to queue_colourise().
Remove update_type_keywords() function since this is now all handled
in the document_update_type_keywords() function. This function had a
comment about updating all documents when sci is NULL but it was never
used in this way since it was only called on document_load_config() which
always operates on a single document and the sci should not be NULL.
* Put back ui_hookup_widget and ui_lookup_widget functions
* Put back lookup_widget code in stash.c
* Emulate old create_*() functions from interface.[ch].
* Hookup all the GtkBuilder widget's to their top widgets like Glade 2
generated code would've done.
* Misc changes to accomodate the above.
These leaks actually were not "real" leaks since the memory will anyway
be kept until quit. Fixing those only makes the code "cleaner" and
will prevent them to "hide" some other (real) ones at debug times.
The format of the error message output of the py_compile module has changed in
Python 2.6. The code now tries to detect the format and parse it accordingly.
Store a pointer to the stash pref for each row, so display/update is just
O(n) instead of O(n^2) time.
This changes the order prefs are updated in, but this doesn't matter.