8772 Commits

Author SHA1 Message Date
Jiří Techet
85a894b097 Grab args.c/h uctags implementation
Basically dead code for us.
2016-10-08 14:12:45 +02:00
Jiří Techet
c6294e37c9 Grab uctags ctags.h and add repoinfo.c/h 2016-10-08 14:12:45 +02:00
Jiří Techet
2b8c7ae5ad Sync the rest of routines.c/h
Requires checking for errno.h limits.h in autoconf as there are ifdefs
around those in routines.c.
2016-10-08 14:12:45 +02:00
Jiří Techet
65f782b6d2 Don't initialize ExecutableProgram and ExecutableName
We shouldn't need it.
2016-10-08 14:12:45 +02:00
Jiří Techet
d5b60d2f21 Use uctags implementation of strstr() 2016-10-08 14:12:45 +02:00
Jiří Techet
3219d9783c Make sure that file extension is taken from file (not preceding directory) 2016-10-08 14:12:45 +02:00
Jiří Techet
9e7eade7c0 Use parse separator utilities in routines.c 2016-10-08 14:12:45 +02:00
Jiří Techet
f0e7af2c32 Make combinePathAndFile() return char * instead of vString
Also move eStrdup() to the correct position in the header.

In addition add the same includes into debug.h as those in uctags (the
removal of vstring inclusion inside routines.h causes compilation errors -
it would be best to explicitly include all needed files in every source to
avoid problems like this but let's do just syncing the two implementations
for now).
2016-10-08 14:12:45 +02:00
Jiří Techet
fb4fc07b6a Make tempFile() return MIO 2016-10-08 14:12:45 +02:00
Jiří Techet
ed01b7edb4 Grab uctags keyword.c/h and add types.h with type declarations
keyword.c/h contains only changes made by me. To make the sync complete,
add type.h with type declarations (and remove the added declarations from
their original locations).
2016-10-08 14:12:44 +02:00
Jiří Techet
a52137f414 Grab uctags implementation of strlist
Except missing mio_free() in stringListNewFromFile() which has been ported
to uctags.

Except the use of ptrarray for strlist implementation, there's nothing
interesting in the Geany version which would be worth preserving.
2016-10-08 14:12:44 +02:00
Jiří Techet
ed6d24bb9a Remove unused functions from options.c/h 2016-10-08 14:12:44 +02:00
Jiří Techet
2f1ad0232b Remove most uses of glib calls
Some special cases which require more work still remain, plus there's
still GRegex.
2016-10-08 14:12:44 +02:00
Jiří Techet
560107804c Drop some more unused functions from routines.c/h
Also get the error() implementation from error.c/h (modified slightly to
make sure exit() isn't called and which doesn't call errorPrinter() as
this one should be set somewhere else in the code and it doesn't happen
now).
2016-10-08 14:12:35 +02:00
Jiří Techet
d88a9dd3fc Eliminate uses of g_stat()
Convert g_stat() to stat() and introduce eStat() to routines.c/h and use
it instead of getFileSize() and isExecutable().

On the way grab implementations of isSameFile() and tempFile() from
universal-ctags (I haven't checked in detail if all the ifdef cases do the
right thing but these functions aren't probably called in Geany so
we don't have to worry much). Also drop unused setCurrentDirectory().
2016-10-06 17:20:36 +02:00
Jiří Techet
992306aec3 Add generic pointer array 2016-10-06 15:41:19 +02:00
Jiří Techet
227b808799 Grab the complete uctags vString implementation
All the changes in the first half of .c/.h were introduced by me in uctags
(and thus they are guaranteed to be great ;-).

The following functions were missing in our ctags implementation and are
added by this commit (currently unused):

extern vString *vStringNewOrClear (vString *const string);
extern char    *vStringDeleteUnwrap (vString *const string);
extern void vStringCatSWithEscaping (vString* b, const char *s);
extern void vStringCatSWithEscapingAsPattern (vString *output, const char* input);

read.c has been updated to use vStringResize() instead of
vStringAutoResize().
2016-10-06 15:33:24 +02:00
Colomban Wendling
7ae1d031ef Merge pull request #1251 from techee/bool
CTags: boolean to C99 bool conversion and vStringTerminate() removal
2016-10-04 18:10:24 +02:00
Jiří Techet
40396a392e ctags: drop vStringTerminate()
It's call is unnecesssary. Corresponds to universal-ctags commit
cfc45e3bd9000e8ce193399c7e0ecf2bbeb57977.
2016-10-04 18:06:33 +02:00
Jiří Techet
662765852f ctags: Use bool definitions from stdbool.h
Since Geany requires C99 parser, the patch just simply includes stdbool.h
in general.h and drops the TRUE, FALSE definitions inside the same file.
The rest is purely mechanical

boolean -> bool
TRUE -> true
FALSE -> false

plus some alignment fixes.

This patch corresponds to universal-ctags commit ce990805a0a0269c.
2016-10-04 18:05:54 +02:00
Colomban Wendling
12b9f27a79 Fix double escaping of markup in bold labels (oops)
2499b96ea1d1eb523733c95e7ec73af827b6032e fixed missing escaping of
markup text, but failed to remove explicit escaping from
ui_label_new_bold(), leading to dual escaping of bold labels.
2016-09-22 15:43:04 +02:00
Landrok
d8ee2ccf8e Fix some typos in French translation (#1227) 2016-09-19 09:33:47 +02:00
Enrico Tröger
2a2ae72834 Merge pull request #1166 from eht16/fix_template_error_message
Improve template command error message
2016-09-11 11:12:18 +02:00
Matthew Brush
6bc43f745e Merge pull request #1203 from codebrainz/document-data
Document data
2016-09-10 19:40:38 -07:00
Matthew Brush
cc18dd0e60 Gracefully handle proxies registering invalid extensions (#1212)
It is very hard to debug if the proxy plugin happens to give
extensions starting with a dot. If they do, detect this case, warn
in the debug messages, and fix the extension. It seems unlikely
that files with two dot extensions will be desired, so it should
case no harm.
2016-09-10 19:24:16 -07:00
Matthew Brush
7d172ceeb3 Improve GeanyProxyProbeResults a litte (#1213)
* Add GEANY_ prefix to enumerators.
* Use a discrete set of enumerators so the proxy doesn't have to
  worry about flag bitmasks, which isn't required.
* Update documentation.
* Use the new enumerators in Geany.
* Improve debug output for bogus values a bit.
2016-09-10 19:18:10 -07:00
Colomban Wendling
afaec63ffb Merge pull request #1160 from techee/ctags_sync
Ctags sync, part 1
2016-09-10 09:24:15 +02:00
Simon Marchi
13ef73d109 Recognize .exp (Expect) files as Tcl
Expect [1] scripts filenames generally end in .exp, although the code
itself is actually in Tcl.  I find my self manually selecting Tcl quite
often, so I think it would be nice if Geany would recognize it direcly
as Tcl.

[1] http://expect.sourceforge.net/

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
2016-09-09 20:52:01 -07:00
Jiří Techet
63c054a61e #if 0 currently unused code to avoid compiler warning 2016-09-09 18:00:41 +02:00
Jiří Techet
f511787f31 Add missing prototypes 2016-09-09 17:46:13 +02:00
Jiří Techet
1e14667bbc Don't compare foreign values to enumeration type
Clang warns when comparing an enumeration type with a value not found
in this enumeration:

warning: comparison of constant VALUE with expression of type 'TYPE' is
      always false [-Wtautological-constant-out-of-range-compare]

If the compiler then decides to optimize the test away because it
assumes the it is indeed always false, it can lead to pretty subtle and
nasty issues.

Ported universal-ctags patch from Colomban Wendling
2016-09-09 17:18:17 +02:00
Colomban Wendling
a5a888c5e3 Merge pull request #1217 from b4n/filetypes/c-lexer-properties
Inherit C lexer_properties in all filetypes inheriting C styles
2016-09-07 11:09:52 +02:00
Colomban Wendling
db6f671135 GTK: Fix autoc font size on GTK >= 3.21.0
GTK 3.21.0 fixed font size handling, leading to properly interpreting
pixels and points in CSS declarations.  However, as older versions
incorrectly handled those, the code has to handle both behaviours.

From CSS, GTK < 3.21.0 actually applied the conversion to points, but
incorrectly: 10px was used as 10pt, but 10pt was scaled up twice.

So, assuming 96 DPI, it leads to:

font-size | 3.20.0  | 3.21.0  |
----------|---------|---------|
10px      | 13.33px | 10px    |
10pt      | 17.77px | 13.33px |

So, we need to fix the code to accommodate for both (either scaling
ourselves, or adapting the unit: I chose the second, simpler, option).

See https://git.gnome.org/browse/gtk+/commit/?id=df08fc91bdc1d2e4c866122304fabe4dd298a7de

X-Scintilla-Bug-URL: https://sourceforge.net/p/scintilla/bugs/1859/
X-Scintilla-Commit-ID: a4b5da8b3a0a05a1e67ba7eb08474106d421b088
2016-09-07 11:05:17 +02:00
Enrico Tröger
3f14086106 Improve template command error message
The previous string was a bit confusing what the placeholders
could mean. There was an error in the German translation where
the second placeholder was interpreted as template name instead
of the error message.
This change should make it more clear and also put the error message
to the end of the string.
2016-09-07 09:34:42 +02:00
Colomban Wendling
c9d0bd7214 Inherit C lexer_properties in all filetypes inheriting C styles
`lexer.cpp.track.preprocessor` lexer properties affects which styles
are used, and we don't set those, so no filetype inheriting C styles
should set it to 1.

Similarly, some properties like `styling.within.preprocessor` are
mostly general settings rather than selecting syntax details, so they
should probably match in all filetypes for consistency.

So, inherit the C lexer_properties everywhere C styles are used, and
only override specific properties in the inheriting filetype.
2016-09-06 12:18:48 +02:00
Colomban Wendling
bbdf56fc2e Haxe: Do not track preprocessor for styling
We don't set the styles for inactive preprocessor sections, so we
should make sure they aren't used.  Also, Haxe has different
preprocessor directives than C does, which confuses LexCPP tracking
anyway.

Fixes #936.
2016-09-06 11:35:11 +02:00
Colomban Wendling
09796ef727 Remove SciTE properties from filetype definitions
Those are SciTE-specific things that Scintilla itself never used,
and that were simply erroneously imported into Geany.
2016-09-06 11:08:52 +02:00
Colomban Wendling
18db459632 Update Scintilla to version 3.6.7
Fixes #1143.
2016-09-05 22:31:52 +02:00
Frank Lanitz
b7688b04b2 Update of Swedish translation 2016-09-05 11:13:26 +02:00
Frank Lanitz
d51daca284 Little update of NEWS for recent translation updates 2016-09-04 17:36:50 +02:00
Robert Antoni Buj Gelonch
39eb8ac66f Update Catalan translation (#1206) 2016-09-04 13:06:08 +02:00
Marcelo Camargo
7ccee5287a i18n: Fixed incorrect word in pt_BR (#1202)
* Changed gender of noun IDE

* Fixed incorrect word in pt_BR
2016-09-02 14:50:45 +02:00
Matthew Brush
7b2b9609e4 Add plugin API functions to get/set document data
TODO: add doc-comment annotations for GObject-Introspection
2016-09-01 19:46:20 -07:00
Matthew Brush
ce6c0fad94 Add support for Keyed Data Lists for documents 2016-08-31 21:02:24 -07:00
Colomban Wendling
095d889582 VTE: Fix crash when trying to change VTE directory at startup
2150302fe6e88f88e5eba78502b478be2b78c662 introduced a bug, because
configuration_load_session_files() calls VTE code if vte_info.have_vte
is non-FALSE, before vte_init() has been called.  So, it relied in the
implicit 0-initialization of the vte_info global, which the above
commit changed carelessly.

So, instead of altering vte_info.have_vte early, add a specific flag
for whether VTE is disabled on the command line.

Also, explicitly initialize vte_info to suggest to the reader the
default values does matter.
2016-08-22 20:03:18 +02:00
Jiří Techet
cb7da79824 Add CTAGS_ATTR_ prefix to UNUSED() and PRINTF() macros
Also fix the macro use in objc.c to appear behind variables.
2016-08-22 14:54:19 +02:00
Colomban Wendling
d3b0bbec26 Merge pull request #1154 from b4n/lines-around-scroll
Add support for keeping the cursor a number of lines from the edges
2016-08-21 13:56:25 +02:00
Colomban Wendling
a4a4accc42 Add support for keeping the cursor a number of lines from the edges
Closes #1152.
2016-08-21 13:56:04 +02:00
Colomban Wendling
c5d409340b Merge pull request #1174 from b4n/escape-markup
Escape format arguments passed to ui_label_set_markup(), and deprecate
ui_frame_new_with_alignment() which exposed a broken API because of it.
2016-08-20 19:58:42 +02:00
Colomban Wendling
42c02db149 Merge pull request #1155 from b4n/cxx-check
Test whether the C++ compiler works by compiling a test program
2016-08-20 19:55:26 +02:00