57 Commits

Author SHA1 Message Date
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
Nick Treleaven
2473ab6862 Revert X11 workspace socket support as it needs more work; moved
to workspace-sockets branch.



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5292 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-10-07 14:10:32 +00:00
Nick Treleaven
4c3ab61c3f Use a separate socket per workspace on X (patch by Erik de Castro
Lopo, thanks).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5232 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-09-15 17:04:23 +00:00
Enrico Tröger
8c963d2829 Make string arguments const where appropriate (patch by Colomban Wendling, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4862 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-25 17:43:39 +00:00
Enrico Tröger
df8e08dbe8 Fix Windows build by properly guarding Unix-only code.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4848 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-21 18:50:48 +00:00
Enrico Tröger
45b4cd4a7d When starting and trying to access the Unix Domain socket of a potentially running instance, first compare file ownership with the user id of the running process to prevent accessing a wrong socket file (part of #2985463, this might not yet be the final solution).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4842 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-19 21:20:15 +00:00
Enrico Tröger
7159c7c371 Add new command line option --list-documents to return a list of currently opened documents (closes #2979933).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4820 ea778897-0a13-0410-b9d1-a72fbfd435f5
2010-04-11 21:56:50 +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
d9e7c95531 Allow opening Geany projects remotely.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4455 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-11-29 19:59:13 +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
a95a59a42f Remove all G_LIKELY macros inside g_return_if_fail() statements as this is redundant.
Remove many other G_LIKELY/G_UNLIKELY macros which doesn't make much sense to keep the code more readable.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3708 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-15 22:47:33 +00:00
Enrico Tröger
500935d788 When opening files from a remote instance on X11, set the window server time to encourage window managers to pop up the main window (related to #2735467 and #2276179).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3703 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-08 16:06:25 +00:00
Enrico Tröger
a9dc990049 Start using G_LIKELY/G_UNLIKELY macros to gain a little more performance when building the code with gcc.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3687 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-04-05 21:07:40 +00:00
Enrico Tröger
66285ef9f1 Don't present the main window of a running instance when starting a second instance separately.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3632 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-16 14:41:10 +00:00
Nick Treleaven
00de18c7a3 Minor fixes.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3631 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-16 14:03:20 +00:00
Enrico Tröger
3be9ab0937 Reduce default file permissions on the Unix Domain socket file (reported by Jörg Sommer, thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3628 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-03-15 07:50:05 +00:00
Enrico Tröger
4b5e88af2a Fix wrong logic.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3503 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-22 20:32:04 +00:00
Enrico Tröger
c980b2e4b1 Minor cleanup in the socket code.
When files are opened remotely, always use gtk_window_present() to bring the main window to front or whatever the window manager decides to do (part of #2276179).
On Windows, we send a pointer to the main window to the remote instance which then brings the window to the front (grab focus). This should work better than the previous implementation and should avoid the blinking tasklist item.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3502 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-22 20:31:35 +00:00
Enrico Tröger
c636728975 Fix several compiler warnings and build errors (patch by Daniel Richard G., thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3460 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-11 18:29:39 +00:00
Enrico Tröger
39a6eb455e Update copyright information.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3446 ea778897-0a13-0410-b9d1-a72fbfd435f5
2009-01-04 18:30:42 +00:00
Enrico Tröger
c8a5db5f6b Update comment about using different configuration directories with multiple instance support on Windows.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3371 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-11 19:05:17 +00:00
Enrico Tröger
023c70b887 Mention Hiro in the copyright notice as the code is based on Sylpheed's socket implementation.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3365 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-12-11 17:37:21 +00:00
Enrico Tröger
d7caf0f9c0 Follow XDG Base Directory specification and use $XDG_CONFIG_HOME/geany (most often this is ~/.config/geany) as default configuration directory (closes #2166229).
The previous configuration will be moved to the new location if the new directory doesn't exist yet.
Move utils_make_settings_dir() into main.c.
Remove win32_get_appdata_folder() because g_get_user_config_dir() does the same.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3219 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-11-13 14:37:47 +00:00
Nick Treleaven
bee27a12d1 Show SVN revision also for geany -v and first status message.
Add main_get_version_string().
Rename get_argv_filename() main_get_argv_filename().


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2991 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-09-24 12:07:22 +00:00
Nick Treleaven
7939b900ae Fix filename encoding for new files at startup from the command-line.
Make socket open command support filename:line:column syntax.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2795 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-07-21 14:12:15 +00:00
Enrico Tröger
0f22574e4b When opening files remotely using the socket, handle filename encoding better and try to auto-detect the used encoding as it might be different each time (hopefully closes #2003980).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2731 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-28 08:15:18 +00:00
Nick Treleaven
a85c71ee9b Remove document_delay_colourise(), document_colourise_all().
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2719 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-20 14:19:57 +00:00
Enrico Tröger
d3439f8a17 Use document pointer instead of an index to the documents array everywhere in the core code.
Pass a document pointer to the callbacks of all "document-*" signals.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/document-pointer@2692 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-06-15 13:35:48 +00:00
Nick Treleaven
be0d9e8ea7 Note: this breaks the plugin API.
Replace doc_array with documents_array, a pointer array. This is
necessary to avoid breaking the ABI every time a field is added to
GeanyDocument.
Remove deprecated pluginmacros.h documents macro, to avoid a
conflict.
Replace doc_list[] macro with documents[] macro, which returns a
GeanyDocument pointer.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2624 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-29 17:00:54 +00:00
Nick Treleaven
398efbd373 Note: this commit breaks the plugin API.
Split widget fields out of GeanyApp into GeanyMainWidgets, so other
data items can be added without breaking the plugin ABI.
Add GeanyData::main_widgets, and macro.
Rename treeview_notebook sidebar_notebook in GeanyMainWidgets.
Move tools_menu from GeanyData to GeanyMainWidgets.
Move statusbar out of GeanyApp (shouldn't be used directly).
Move ignore_callback out of GeanyApp.
Rename sci_goto_line() argument unfold, like sci_goto_pos().
Make utils_goto_file_pos(), utils_goto_line(),
utils_switch_document() into static functions (they are UI-related,
so shouldn't be in utils.c).
Move utils_goto_pos() to editor.c, add mark argument.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2609 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-22 14:41:28 +00:00
Enrico Tröger
a8855d2ec5 Iconify the main window on Windows before de-iconifying it when opening files remotely to ensure the main window pops up.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2573 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-05-12 12:40:37 +00:00
Enrico Tröger
b7bfb2743a Replace all C++-style comments with usual C-like multi-line comments.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2287 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-27 13:17:29 +00:00
Enrico Tröger
85f73129c0 Apply patch from Daniel Richard G. to fix to fix several compiler warnings, C89 violations and minor code problems (thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2267 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-20 11:24:23 +00:00
Enrico Tröger
cbd5839cce Fix compiler warnings on Windows.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2264 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-18 17:17:55 +00:00
Enrico Tröger
36882435a1 Apply patch from Daniel Richard G. to update some source code comments (thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2259 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-15 16:32:27 +00:00
Enrico Tröger
fe728b7c88 Allow start of Geany with given files on the command line but whithout a writable temporary directory and without a writable configuration directory.
Improve filename of created symlink to the socket file.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2251 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-12 12:04:55 +00:00
Enrico Tröger
b922aae8d0 Apply patch from Daniel Richard G. to include the hostname in the socket filename (thanks).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2247 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-10 17:55:00 +00:00
Enrico Tröger
feb118c8bf Use a random integer as part of socket file name instead of current time stamp.
Before creating a new socket, delete a maybe existing socket and its symlink.	    


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2244 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-10 12:36:32 +00:00
Enrico Tröger
ba8fc7de0e Include display number for the filename of the symbolic link to the real Unix Domain Socket file (closes #1888565).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2236 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-07 17:27:05 +00:00
Enrico Tröger
10fb8c2047 Create the Unix Domain Socket for detecting a running instance in system's tmp directory and create a symlink to it in Geany's configuration directory (closes #1888561).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2235 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-02-07 15:53:02 +00:00
Enrico Tröger
e3201062c6 Update copyright information and change format of email addresses in source files.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@2150 ea778897-0a13-0410-b9d1-a72fbfd435f5
2008-01-06 18:11:57 +00:00
Nick Treleaven
274058eb7a Neaten up the plugin API:
Make document_open_file() now wrap document_open_file_full(),
without the idx for reloading or pos arguments.
Replace str_replace() with string_replace_all() in the plugin API.
Add utils_string_replace_all(), taking a GString argument.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1868 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-09-11 15:21:11 +00:00
Nick Treleaven
1887a20df4 Add text argument for document_new_file(), so that it's independent
from filetype templates.
Make File->New create a blank document, rather than using the None
filetype template.
Add None option for the 'New with Template' menu commands.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1848 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-09-03 16:09:53 +00:00
Enrico Tröger
52f3ba3499 Use a unique mutex name on Windows to be able to load multiple instances like on non-Windows systems.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1664 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-07-04 17:42:01 +00:00
Nick Treleaven
7cb6832039 Speed up loading multiple C-like files when existing documents are
open (by ensuring documents are only colourised once).
Add document_open_files(), document_colourise_new().
Add some missing function parameter names to document.h.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1369 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-03-06 16:57:09 +00:00
Nick Treleaven
806dd5be1d Add descriptions for all .c source files below the file header.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1329 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-02-24 11:41:56 +00:00
Enrico Tröger
f548b5b5bb Added possibility to create and open non-existent files from command line (closes #1635094 and #1652917).
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1290 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-02-15 23:56:15 +00:00
Enrico Tröger
826cd9961e Added command line option --column to allow setting the initial column for the first opened file on command line.
Don't apply the --line and --column options to the first opened session file.
Make --line and --column options work for opening files in an already running instance.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1227 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-01-24 22:38:53 +00:00
Enrico Tröger
7b61ad934d Updated copyright information.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1188 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-01-14 17:36:42 +00:00
Nick Treleaven
ad78c7e1a0 Print an error message (instead of debug message) when a
command-line file cannot be loaded.


git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1178 ea778897-0a13-0410-b9d1-a72fbfd435f5
2007-01-13 12:42:12 +00:00