Colomban Wendling
0ebf6ab82e
Windows: convert the spawned command to locale encoding
...
Converting to locale encoding is required to allows non-ASCII
characters in the command, e.g. in the file names.
2014-02-19 15:54:51 +01:00
Colomban Wendling
6af27eeb7a
Windows: add a debug to show the command as it is run
2014-02-19 15:53:25 +01:00
Colomban Wendling
5c893e9b0e
Windows: fix spawning commands with spaces
...
Fix spawnning command under Windows when they contain spaces in both
the executable and the arguments. Apparently system() quoting is
unexpected, and doesn't work properly if there is more than 2 quotes
in the whole command.
To work this around, spawn the command through `cmd.exe /S /C`.
2014-02-19 15:53:25 +01:00
Colomban Wendling
8980970630
Unify color parsing
...
Change utils_parse_color() to use gdk_color_parse() and follow its
syntax, additionally supporting our "0x" prefix as a synonym for the
"#" prefix; and use this everywhere.
Also add utils_color_to_bgr() and utils_parse_color_to_bgr() to provide
conversion to the 24 bits BGR format used by Scintilla.
2013-12-04 15:31:17 +01:00
Colomban Wendling
507005ca54
Rename utils_strtod() to utils_parse_color()
...
Rename the function to a more sensible name, and remove unnecessary
arguments. Now, format (# or 0x) is auto-detected.
2013-12-02 22:38:11 +01:00
Colomban Wendling
1f2279aefe
Always use proper functions argument lists
2013-11-10 01:43:10 +01:00
Nick Treleaven
6a19a4488d
Add info on how g_spawn is broken on Windows
2013-10-31 13:54:31 +00:00
Colomban Wendling
82f82ed372
Use GLib's portable version gethostname(): g_get_host_name()
...
Drop our own portability layer and use GLib's one instead (which
actually does exactly the same as our own).
Thanks to Matthew for spotting this.
2013-08-18 00:52:48 +02:00
Enrico Troeger
029d78536c
Don't try to set std_out and std_err if they are NULL
2013-04-14 13:22:41 +02:00
Nick Treleaven
feb4a6409e
Remove unused variables
2013-03-15 17:55:18 +00:00
Colomban Wendling
eab86bc6ad
win32: Fix crash with -v if stream redirection setup fails
...
Properly check for errors when setting up debug console stream
redirections so if it fails it doesn't crash everything.
2013-02-14 00:50:59 +01:00
Nick Treleaven
a3664fae9e
Fix spawning [synchronous] commands on Windows
...
Build command spawning failed sometimes when there were several
pages of errors. In these cases the process would block for 30s and
then abort. (Some hangs were also experienced).
This fix does cause a console window to be shown for the duration of
the spawned process. This seems acceptable compared with the old
broken behaviour, and can be useful to abort the build command by
closing the console window.
Note: If 'env' is passed, the old broken spawning is used.
2012-10-24 17:35:19 +01:00
Colomban Wendling
d80bc7ce56
Update FSF address
...
Closes #3557875 .
2012-08-24 19:25:57 +02:00
Nick Treleaven
8d26450f07
Add status bar warning if Windows spawn timed out
2012-07-09 13:31:04 +01:00
Colomban Wendling
1c2c455b1d
Update copyright information
2012-06-18 01:15:04 +02:00
Colomban Wendling
ce21bdfb21
Use g_set_error() rather than manualy creating the GError
2012-02-05 19:15:44 +01:00
Nick Treleaven
3cb3826aad
Fix using 'All files' instead of 'None' in Open dialogs (Windows)
2012-01-08 17:53:49 +00:00
Enrico Tröger
22ba6de142
Remove set but unused variable dwStatus ( closes #3440276 ).
2011-11-20 13:39:20 +01:00
Matthew Brush
c9a32bfdc9
Make use of gtk_widget_get_window() added in GTK+ 2.14
2011-11-06 18:25:48 -08:00
Enrico Tröger
c51129db6e
When using the debug console, capture stdin as well.
...
This enables us to wait for input in the debug console window
and so keep it open if necessary until there is some input of
the user.
2011-10-23 16:29:17 +02:00
Nick Treleaven
e9021f2174
Windows: Fix wrongly shown debug message 'GetExitCodeProcess failed'
2011-10-13 16:33:15 +01:00
Nick Treleaven
c2ce2403f4
Windows: Fix 'Create process failed' message to show correct error
...
This helps when trying to run build commands that don't exist;
the status bar message for that is now:
Process failed (The system cannot find the file specified.)
2011-10-13 16:18:40 +01:00
Matthew Brush
bd5fba7eb5
Remove extra whitespace at end of lines in all source files.
...
* Processed with rstrip-whitespace.py script added to scripts/ directory.
* Script run on all .c and .h files in src/ and plugins/ directories.
* Also remove more than one newline at the end of files.
2011-10-11 21:52:58 -07:00
Colomban Wendling
d06e9f4575
Remove $Id$ and $Date$ SVN keywords
2011-10-09 22:57:35 +02:00
Nick Treleaven
5b220d70a2
* Merge branches/unstable:
...
- tagmanager/php.c:
Fix parsing keyword-qualified functions strictly, e.g. don't
parse 'staticfunction' or 'fatfunction'.
- src/utils.c, src/utils.h, src/editor.c:
Use GRegex for snippet indentation replacement - fixes wrong
behaviour with Mac line endings.
- tagmanager/lregex.c, TODO:
Use GRegex for CTags instead of POSIX regex - GRegex is more
powerful. This also fixes a (HTML) performance issue on Windows.
Geany will now print a debug warning when using the "b" CTags
regex flag option for non-extended syntax. This is not currently
used by Geany's parsers.
Note: GNU regex can't be removed yet as it's still used elsewhere
by Geany.
- src/build.c, doc/pluginsignals.c:
When saving on build, prompt for a filename if necessary.
Emit the "build-start" signal only if saving succeeds.
- src/build.c:
Use #ifdef SYNC_SPAWN instead of G_OS_WIN32 for easier testing with
glib's asynchronous spawning (which doesn't work on Windows).
- src/win32.c, src/win32.h, src/dialogs.c:
Use GTK unsaved file dialog on Windows too because the button names
should be specific.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5987 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-10-03 14:35:11 +00:00
Nick Treleaven
c2b8bc1c4f
Fix \0 char in format string - save as dialog filter bug.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5946 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-09-22 15:53:14 +00:00
Nick Treleaven
a80bab9e3c
Use GTK unsaved file dialog on Windows too because the button names
...
should be specific.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/unstable@5941 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-09-21 15:35:38 +00:00
Nick Treleaven
233f36a603
Fix uninitialized font size & other fields.
...
Remove unhooked font dialog apply button.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5916 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-09-14 12:01:29 +00:00
Colomban Wendling
15eb27b44a
Remove last GLib >= 2.16 check
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5853 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-06-17 22:51:35 +00:00
Enrico Tröger
c03d77d8a6
Remove unused variables
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5684 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-04-03 16:35:27 +00:00
Enrico Tröger
6ac2623208
Update copyright information.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5528 ea778897-0a13-0410-b9d1-a72fbfd435f5
2011-01-19 19:39:09 +00:00
Enrico Tröger
fb3f890969
Remove old code.
...
Pass and use also parent and title arguments to win32_show_document_open_dialog().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4914 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-15 11:57:40 +00:00
Enrico Tröger
1e9b5cf97c
Don't use file filters for the native Windows Save As dialog.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4913 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-15 11:47:22 +00:00
Enrico Tröger
e95326ea20
Sort file filters for the native Windows file open dialog by name.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4912 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-15 11:35:26 +00:00
Enrico Tröger
187a9c1c38
(Re-)Implement a (still basic) native Windows Save As dialog when compiled with GEANY_USE_WIN32_DIALOG.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4897 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-05-10 21:52:43 +00:00
Enrico Tröger
f12ed2fabe
Fix broken opening URLs e.g. when using the 'builtin' Run command.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4860 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-25 17:42:56 +00:00
Enrico Tröger
95d82159a8
Change the limit for the command line length when executing commands to a maximum of 32768 characters ( closes #2979697 ).
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4856 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-25 17:42:12 +00:00
Enrico Tröger
a01a4f68e3
Make CreateChildProcess() working with Unicode strings, e.g. directory names (closes 2972606).
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4779 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-03-20 15:16:21 +00:00
Enrico Tröger
7ba4a81181
Update copyright information.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4518 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-01-01 22:55:18 +00:00
Enrico Tröger
ba94d0ce6f
Rename win32_show_file_dialog() to win32_show_document_open_dialog() as it is specialised for opening documents.
...
Implement win32_show_file_dialog() as a generic file open dialog and use it with ui_path_box_new().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4505 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-12-20 21:49:23 +00:00
Enrico Tröger
b7b4de41f4
Rename win32_show_project_folder_dialog() to win32_show_folder_dialog() as it is not related and not used by any project management related code.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4504 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-12-20 21:03:28 +00:00
Nick Treleaven
1986d915cc
Run ./scripts/fix-alignment.pl -w src/*.[hc] plugins/*.[hc] (skipping generated files).
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4199 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-09-16 14:13:38 +00:00
Enrico Tröger
bd0f98f3f5
Fix opening of local files in the browser on Windows.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4098 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-08-16 17:27:01 +00:00
Enrico Tröger
b1309fc6ce
Expand system environment variables (%variableName%) on Windows when running Build commands.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4050 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-08-02 13:33:39 +00:00
Enrico Tröger
9a99df62a3
Fix some harmless compiler warnings.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4002 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-07-20 23:09:29 +00:00
Enrico Tröger
9a54f5f7b1
Fix broken 'builtin' Run command for HTML files on Windows.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3969 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-07-14 18:49:31 +00:00
Enrico Tröger
ca1e027925
Prevent possible crash on Windows when not setting an initial directory for native File Open/Save dialogs.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3871 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-06-17 18:18:46 +00:00
Enrico Tröger
1c472c52c2
Minor cleanup
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3820 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-05-27 18:54:16 +00:00
Enrico Tröger
89c442d38a
Properly terminate the resulting strings when reading the stdout and stderr of any spawned commands on Windows.
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3819 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-05-27 18:34:39 +00:00
Enrico Tröger
538f2f5d25
On Windows, fallback to the literal build command line if searching for the command in the system path failed (related to #2795923 ).
...
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3818 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-05-27 18:00:05 +00:00