Revision: 2251 http://geany.svn.sourceforge.net/geany/?rev=2251&view=rev Author: eht16 Date: 2008-02-12 04:04:55 -0800 (Tue, 12 Feb 2008)
Log Message: ----------- 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.
Modified Paths: -------------- trunk/ChangeLog trunk/src/main.c trunk/src/socket.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-02-12 12:04:21 UTC (rev 2250) +++ trunk/ChangeLog 2008-02-12 12:04:55 UTC (rev 2251) @@ -1,3 +1,15 @@ +2008-02-12 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de> + + * src/editor.c, src/search.c, src/ui_utils.c: + Allow using Find In Files dialog even if no files are open + (closes #1891818). + * src/main.c, src/socket.c: + 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. + + 2008-02-11 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
* src/about.c, THANKS: Added Nikita E. Shalaev to list of
Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2008-02-12 12:04:21 UTC (rev 2250) +++ trunk/src/main.c 2008-02-12 12:04:55 UTC (rev 2251) @@ -692,7 +692,7 @@ socket_info.lock_socket = -1; socket_info.lock_socket_tag = 0; socket_info.lock_socket = socket_init(argc, argv); - if (socket_info.lock_socket < 0) + if (socket_info.lock_socket == -2) { // Socket exists if (argc > 1) // filenames were sent to first instance, so quit
Modified: trunk/src/socket.c =================================================================== --- trunk/src/socket.c 2008-02-12 12:04:21 UTC (rev 2250) +++ trunk/src/socket.c 2008-02-12 12:04:55 UTC (rev 2251) @@ -179,7 +179,9 @@
/* (Unix domain) socket support to replace the old FIFO code - * (taken from Sylpheed, thanks) */ + * (taken from Sylpheed, thanks) + * Returns the created socket, -1 if an error occurred or -2 if another socket exists and files + * were sent to it. */ gint socket_init(gint argc, gchar **argv) { gint sock; @@ -224,7 +226,7 @@ *p = '_';
if (socket_info.file_name == NULL) - socket_info.file_name = g_strdup_printf("%s%cgeany_socket.%s%s", + socket_info.file_name = g_strdup_printf("%s%cgeany_socket_%s_%s", app->configdir, G_DIR_SEPARATOR, hostname, display_name);
g_free(display_name); @@ -245,7 +247,7 @@ }
socket_fd_close(sock); - return -1; + return -2; }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.