Revision: 2032
http://geany.svn.sourceforge.net/geany/?rev=2032&view=rev
Author: eht16
Date: 2007-11-07 09:33:42 -0800 (Wed, 07 Nov 2007)
Log Message:
-----------
Fix bug when creating configuration directory on Unix.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/utils.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-11-07 17:16:28 UTC (rev 2031)
+++ trunk/ChangeLog 2007-11-07 17:33:42 UTC (rev 2032)
@@ -2,6 +2,7 @@
* src/vte.c: Apply patch from Simone Denei to add a "Restart" item to
the VTE popup menu in case running application hangs.
+ * src/utils.c: Fix bug when creating configuration directory on Unix.
2007-11-06 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/utils.c
===================================================================
--- trunk/src/utils.c 2007-11-07 17:16:28 UTC (rev 2031)
+++ trunk/src/utils.c 2007-11-07 17:33:42 UTC (rev 2032)
@@ -722,6 +722,12 @@
}
+#ifdef G_OS_WIN32
+# define DIR_SEP "\\" // on Windows we need an additional dir separator
+#else
+# define DIR_SEP ""
+#endif
+
gint utils_make_settings_dir()
{
gint saved_errno = 0;
@@ -744,17 +750,13 @@
// use _waccess on Windows, access() doesn't accept special characters
saved_errno = win32_check_write_permission(app->configdir);
#else
- access(app->configdir, R_OK | W_OK);
+ // access set also errno to "FILE NOT FOUND" even if app->configdir is writeable, so use
+ // errno only when access() explicitly returns an error
+ if (access(app->configdir, R_OK | W_OK) != 0)
+ saved_errno = errno;
#endif
- saved_errno = errno;
}
-#ifdef G_OS_WIN32
-# define DIR_SEP "\\" // on Windows we need an additional dir separator
-#else
-# define DIR_SEP ""
-#endif
-
// make subdir for filetype definitions
if (saved_errno == 0)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2030
http://geany.svn.sourceforge.net/geany/?rev=2030&view=rev
Author: ntrel
Date: 2007-11-06 09:29:51 -0800 (Tue, 06 Nov 2007)
Log Message:
-----------
Allow scrolling past end of document, so the user can append text
with the last lines drawn at the top of the view.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/document.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-11-06 17:22:25 UTC (rev 2029)
+++ trunk/ChangeLog 2007-11-06 17:29:51 UTC (rev 2030)
@@ -28,6 +28,9 @@
Move navigation items into a new Other keybindings group.
* HACKING, data/filetypes.restructuredtext:
Add a default configuration file for reStructuredText.
+ * src/document.c:
+ Allow scrolling past end of document, so the user can append text
+ with the last lines drawn at the top of the view.
2007-11-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/document.c
===================================================================
--- trunk/src/document.c 2007-11-06 17:22:25 UTC (rev 2029)
+++ trunk/src/document.c 2007-11-06 17:29:51 UTC (rev 2030)
@@ -411,6 +411,7 @@
sci_set_caret_policy_x(sci, CARET_JUMPS | CARET_EVEN, 0);
//sci_set_caret_policy_y(sci, CARET_JUMPS | CARET_EVEN, 0);
SSM(sci, SCI_AUTOCSETSEPARATOR, '\n', 0);
+ SSM(sci, SCI_SETENDATLASTLINE, FALSE, 0); // allow scrolling past end of document
// signal for insert-key(works without too, but to update the right status bar)
//g_signal_connect((GtkWidget*) sci, "key-press-event",
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2029
http://geany.svn.sourceforge.net/geany/?rev=2029&view=rev
Author: ntrel
Date: 2007-11-06 09:22:25 -0800 (Tue, 06 Nov 2007)
Log Message:
-----------
Add a default configuration file for reStructuredText.
Modified Paths:
--------------
trunk/ChangeLog
trunk/HACKING
Added Paths:
-----------
trunk/data/filetypes.restructuredtext
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-11-06 17:07:26 UTC (rev 2028)
+++ trunk/ChangeLog 2007-11-06 17:22:25 UTC (rev 2029)
@@ -26,6 +26,8 @@
Make Notebook tabs keybindings group.
Move Go to tags items into Tags keybindings group.
Move navigation items into a new Other keybindings group.
+ * HACKING, data/filetypes.restructuredtext:
+ Add a default configuration file for reStructuredText.
2007-11-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/HACKING
===================================================================
--- trunk/HACKING 2007-11-06 17:07:26 UTC (rev 2028)
+++ trunk/HACKING 2007-11-06 17:22:25 UTC (rev 2029)
@@ -119,7 +119,7 @@
--generate-data-files argument to work - this is always defined in the
SVN version. Alternatively, edit the file by hand.
-Most languages will need a data/filetypes.foo configuration file. See
+All languages need a data/filetypes.foo configuration file. See
data/filetypes.c for an example. For languages with a Scintilla lexer,
there should be a [styling] section, to correspond to the styles used
in styleset_foo().
Added: trunk/data/filetypes.restructuredtext
===================================================================
--- trunk/data/filetypes.restructuredtext (rev 0)
+++ trunk/data/filetypes.restructuredtext 2007-11-06 17:22:25 UTC (rev 2029)
@@ -0,0 +1,25 @@
+# For complete documentation of this file, please see Geany's main documentation
+[settings]
+# default extension used when saving files
+#extension=rst
+
+# the following characters are these which a "word" can contains, see documentation
+#wordchars=_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
+
+# if only single comment char is supported like # in this file, leave comment_close blank
+#comment_open=#
+#comment_close=
+# this is an alternative way, so multiline comments are used
+#comment_open=/*
+#comment_close=*/
+
+# set to false if a comment character/string should start at column 0 of a line, true uses any
+# indentation of the line, e.g. setting to true causes the following on pressing CTRL+d
+ #command_example();
+# setting to false would generate this
+# command_example();
+# This setting works only for single line comments
+#comment_use_indent=true
+
+# context action command (please see Geany's main documentation for details)
+context_action_cmd=
Property changes on: trunk/data/filetypes.restructuredtext
___________________________________________________________________
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2028
http://geany.svn.sourceforge.net/geany/?rev=2028&view=rev
Author: eht16
Date: 2007-11-06 09:07:26 -0800 (Tue, 06 Nov 2007)
Log Message:
-----------
Quote first element of command line when using Compile, Build and Make commands on Windows to avoid problems if the tools are specified with full path.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/build.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-11-06 16:59:01 UTC (rev 2027)
+++ trunk/ChangeLog 2007-11-06 17:07:26 UTC (rev 2028)
@@ -1,6 +1,9 @@
2007-11-06 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/build.c: Enable stopping of Run command on Windows.
+ * src/build.c: Quote first element of command line when using Compile,
+ Build and Make commands on Windows to avoid problems
+ if the tools are specified with full path.
2007-11-06 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c 2007-11-06 16:59:01 UTC (rev 2027)
+++ trunk/src/build.c 2007-11-06 17:07:26 UTC (rev 2028)
@@ -468,6 +468,29 @@
}
+#ifdef G_OS_WIN32
+/* cmd is a command line separated with spaces, first element will be escaped with double quotes
+ * and a newly allocated string will be returned */
+static gchar *quote_executable(const gchar *cmd)
+{
+ gchar **fields;
+ gchar *result;
+
+ if (! NZV(cmd))
+ return NULL;
+
+ fields = g_strsplit(cmd, " ", 2);
+ if (fields == NULL || g_strv_length(fields) != 2)
+ return g_strdup(cmd);
+
+ result = g_strconcat("\"", fields[0], "\" ", fields[1], NULL);
+
+ g_strfreev(fields);
+ return result;
+}
+#endif
+
+
/* dir is the UTF-8 working directory to run cmd in. It can be NULL to use the
* idx document directory */
static GPid build_spawn_cmd(gint idx, const gchar *cmd, const gchar *dir)
@@ -503,6 +526,10 @@
g_free(executable);
#ifdef G_OS_WIN32
+ // due to g_shell_parse_argv() we need to enclose the command(first element) of cmd_string with
+ // "" if the command contains a full path(i.e. backslashes) otherwise the backslashes will be
+ // eaten by g_shell_parse_argv().
+ setptr(cmd_string, quote_executable(cmd_string));
if (! g_shell_parse_argv(cmd_string, NULL, &argv, NULL))
// if automatic parsing failed, fall back to simple, unsafe argv creation
argv = g_strsplit(cmd_string, " ", 0);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2026
http://geany.svn.sourceforge.net/geany/?rev=2026&view=rev
Author: eht16
Date: 2007-11-06 07:54:46 -0800 (Tue, 06 Nov 2007)
Log Message:
-----------
Enable stopping of Run command on Windows.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/build.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-11-06 13:24:39 UTC (rev 2025)
+++ trunk/ChangeLog 2007-11-06 15:54:46 UTC (rev 2026)
@@ -1,3 +1,8 @@
+2007-11-06 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * src/build.c: Enable stopping of Run command on Windows.
+
+
2007-11-06 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* plugins/svndiff.c:
Modified: trunk/src/build.c
===================================================================
--- trunk/src/build.c 2007-11-06 13:24:39 UTC (rev 2025)
+++ trunk/src/build.c 2007-11-06 15:54:46 UTC (rev 2026)
@@ -111,11 +111,7 @@
static void on_build_make_activate(GtkMenuItem *menuitem, gpointer user_data);
static void on_build_execute_activate(GtkMenuItem *menuitem, gpointer user_data);
static void on_build_next_error(GtkMenuItem *menuitem, gpointer user_data);
-
-
-#ifndef G_OS_WIN32
static void kill_process(GPid *pid);
-#endif
void build_finalize()
@@ -742,7 +738,6 @@
#ifdef HAVE_VTE
if (vte_info.load_vte && vc != NULL && vc->run_in_vte)
{
- /// TODO - working_dir
gchar *vte_cmd = g_strconcat(RUN_SCRIPT_CMD, "\n", NULL);
// change into current directory if it is not done by default
if (! vc->follow_path) vte_cwd(doc_list[idx].file_name, TRUE);
@@ -1920,11 +1915,7 @@
// make the process "stopable"
if (run_info.pid > (GPid) 1)
{
- // on Windows there is no PID returned (resp. it is a handle), currently unsupported
- /// TODO kill also on Windows, maybe use CloseHandle() or something
-#ifndef G_OS_WIN32
kill_process(&run_info.pid);
-#endif
return;
}
@@ -1985,18 +1976,24 @@
}
-#ifndef G_OS_WIN32
static void kill_process(GPid *pid)
{
- /* SIGQUIT is not the best signal to use because it causes a core dump (this should not
+ /* Unix: SIGQUIT is not the best signal to use because it causes a core dump (this should not
* perforce necessary for just killing a process). But we must use a signal which we can
* ignore because the main process get it too, it is declared to ignore in main.c. */
gint result;
+#ifdef G_OS_WIN32
+ g_return_if_fail(*pid != NULL);
+ result = TerminateProcess(*pid, 0);
+ // TerminateProcess() returns TRUE on success, for the check below we have to convert
+ // it to FALSE (and vice versa)
+ result = ! result;
+#else
g_return_if_fail(*pid > 1);
-
result = kill(*pid, SIGQUIT);
+#endif
if (result != 0)
ui_set_statusbar(TRUE, _("Process could not be stopped (%s)."), g_strerror(errno));
@@ -2006,7 +2003,6 @@
build_menu_update(-1);
}
}
-#endif
static void
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 2024
http://geany.svn.sourceforge.net/geany/?rev=2024&view=rev
Author: ntrel
Date: 2007-11-06 05:09:04 -0800 (Tue, 06 Nov 2007)
Log Message:
-----------
Add menu separator so users don't accidentally click revert and lose
all their work.
Capitalize revert menu item.
Modified Paths:
--------------
trunk/ChangeLog
trunk/plugins/svndiff.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-11-06 13:05:20 UTC (rev 2023)
+++ trunk/ChangeLog 2007-11-06 13:09:04 UTC (rev 2024)
@@ -5,6 +5,10 @@
* plugins/svndiff.c:
Fix gtk_widget_destroy() warning when unloading plugin and no svn
binary is in $PATH.
+ * plugins/svndiff.c:
+ Add menu separator so users don't accidentally click revert and lose
+ all their work.
+ Capitalize revert menu item.
2007-11-05 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/plugins/svndiff.c
===================================================================
--- trunk/plugins/svndiff.c 2007-11-06 13:05:20 UTC (rev 2023)
+++ trunk/plugins/svndiff.c 2007-11-06 13:09:04 UTC (rev 2024)
@@ -362,8 +362,11 @@
g_signal_connect((gpointer) menu_svndiff_project, "activate",
G_CALLBACK(svnproject_activated), NULL);
+ gtk_container_add(GTK_CONTAINER (menu_svndiff_menu),
+ gtk_separator_menu_item_new());
+
// SVN revert
- menu_svndiff_revert = gtk_menu_item_new_with_mnemonic(_("Revert changes"));
+ menu_svndiff_revert = gtk_menu_item_new_with_mnemonic(_("Revert Changes"));
gtk_container_add(GTK_CONTAINER (menu_svndiff_menu), menu_svndiff_revert);
gtk_tooltips_set_tip(tooltips, menu_svndiff_revert, _("Revert all made changes at this file"), NULL);
g_signal_connect((gpointer) menu_svndiff_revert, "activate", G_CALLBACK(svnrevert_activated), NULL);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.