Revision: 4359
http://geany.svn.sourceforge.net/geany/?rev=4359&view=rev
Author: eht16
Date: 2009-10-25 11:52:47 +0000 (Sun, 25 Oct 2009)
Log Message:
-----------
Before looking for line and column numbers specified as part of a filename, ensure the file doesn't exist on disk. This allows opening of files like "test:0".
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/main.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-10-25 11:43:21 UTC (rev 4358)
+++ trunk/ChangeLog 2009-10-25 11:52:47 UTC (rev 4359)
@@ -2,7 +2,11 @@
* plugins/saveactions.c:
Fix adding the filetype's default extension when using the
- Instant Save plugin (2885142).
+ Instant Save plugin (closes #2885142).
+ * src/main.c:
+ Before looking for line and column numbers specified as part
+ of a filename, ensure the file doesn't exist on disk. This allows
+ opening of files like "test:0".
2009-10-23 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c 2009-10-25 11:43:21 UTC (rev 4358)
+++ trunk/src/main.c 2009-10-25 11:52:47 UTC (rev 4359)
@@ -318,6 +318,10 @@
if (! NZV(filename))
return;
+ /* allow to open files like "test:0" */
+ if (g_file_test(filename, G_FILE_TEST_EXISTS))
+ return;
+
len = strlen(filename);
for (i = len - 1; i >= 1; i--)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4358
http://geany.svn.sourceforge.net/geany/?rev=4358&view=rev
Author: eht16
Date: 2009-10-25 11:43:21 +0000 (Sun, 25 Oct 2009)
Log Message:
-----------
Fix adding the filetype's default extension when using the Instant Save plugin (2885142).
Modified Paths:
--------------
trunk/ChangeLog
trunk/plugins/saveactions.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-10-23 16:18:05 UTC (rev 4357)
+++ trunk/ChangeLog 2009-10-25 11:43:21 UTC (rev 4358)
@@ -1,3 +1,10 @@
+2009-10-25 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
+
+ * plugins/saveactions.c:
+ Fix adding the filetype's default extension when using the
+ Instant Save plugin (2885142).
+
+
2009-10-23 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/interface.c, src/ui_utils.h, src/prefs.c, src/keyfile.c,
Modified: trunk/plugins/saveactions.c
===================================================================
--- trunk/plugins/saveactions.c 2009-10-23 16:18:05 UTC (rev 4357)
+++ trunk/plugins/saveactions.c 2009-10-25 11:43:21 UTC (rev 4358)
@@ -250,7 +250,7 @@
if (fd != -1)
close(fd); /* close the returned file descriptor as we only need the filename */
- if (ft == NULL)
+ if (ft == NULL || ft->id == GEANY_FILETYPES_NONE)
/* ft is NULL when a new file without template was opened, so use the
* configured default file type */
ft = filetypes_lookup_by_name(instantsave_default_ft);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4355
http://geany.svn.sourceforge.net/geany/?rev=4355&view=rev
Author: elextr
Date: 2009-10-22 21:38:37 +0000 (Thu, 22 Oct 2009)
Log Message:
-----------
Add missing underscores to links.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/geany.html
trunk/doc/geany.txt
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-10-22 11:28:59 UTC (rev 4354)
+++ trunk/ChangeLog 2009-10-22 21:38:37 UTC (rev 4355)
@@ -1,3 +1,9 @@
+2009-10-23 Lex Trotman <elextr.at.gmail.dot.com>
+
+ * doc/geany.txt
+ Add missing underscores to links.
+
+
2009-10-22 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
* src/keybindings.c, src/keybindings.h, doc/geany.txt, doc/geany.html:
Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html 2009-10-22 11:28:59 UTC (rev 4354)
+++ trunk/doc/geany.html 2009-10-22 21:38:37 UTC (rev 4355)
@@ -2530,7 +2530,7 @@
in the <em>Project</em> group of the <a class="reference" href="#preferences">Preferences</a> dialog.</p>
<p>As long as a project is open, the Build menu will use
the items defined in project's settings, instead of the defaults.
-See <cite>Build Menu Configuration</cite> for information on configuring the menu.</p>
+See <a class="reference" href="#build-menu-configuration">Build Menu Configuration</a> for information on configuring the menu.</p>
<p>The current project's settings are saved when it is closed, or when
Geany is shutdown. When restarting Geany, the previously opened project
file that was in use at the end of the last session will be reopened.</p>
@@ -2603,7 +2603,7 @@
<p class="first admonition-title">Tip</p>
<p class="last">If Geany's default error message parsing does not parse errors for
the tool you're using, you can set a custom regex in the Build Commands
-Dialog, see <cite>Build Menu Configuration</cite></p>
+Dialog, see <a class="reference" href="#build-menu-configuration">Build Menu Configuration</a></p>
</div>
<div class="section">
<h3><a class="toc-backref" href="#id131" id="indicators" name="indicators">Indicators</a></h3>
@@ -2747,7 +2747,7 @@
commands dialog</li>
</ul>
<p>The maximum numbers of items in each of the configurable groups can be
-configured when Geany starts using hidden settings(see <cite>Preferences File Format</cite>).
+configured when Geany starts using hidden settings(see <a class="reference" href="#preferences-file-format">Preferences File Format</a>).
Even though the maximum number of items may have been increased, only
those menu items that have values configured are shown in the menu.</p>
<p>The groups of menu items obtain their configuration from four potential
@@ -2872,7 +2872,7 @@
define filetype dependent default menu items.</li>
<li>(Execute, Project File) and (Execute, Preferences) - the project filetype based execute
configuration and preferences non-filetype based execute can only be set by hand editing the
-appropriate file, see <cite>Preferences File Format</cite> and <cite>Project File Format</cite>.</li>
+appropriate file, see <a class="reference" href="#preferences-file-format">Preferences File Format</a> and <a class="reference" href="#project-file-format">Project File Format</a>.</li>
</ul>
</div>
<div class="section">
@@ -4598,7 +4598,7 @@
<p>The [build-menu] section contains the configuration of the build menu.
This section can occur in filetype, preferences and project files and
always has the format described here. Different menu items are loaded
-from different files, see the table in the <cite>Build Menu Configuration</cite>
+from different files, see the table in the <a class="reference" href="#build-menu-configuration">Build Menu Configuration</a>
section for details. All the settings can be configured from the dialogs
except the execute command in filetype files and filetype definitions in
the project file, so these are the only ones which need hand editing.</p>
@@ -4638,7 +4638,7 @@
<p>The <tt class="docutils literal"><span class="pre">filetypes</span></tt> entry is a list of the filetypes which exist in the
project file.</p>
<p>For each filetype the entries for that filetype have the format defined in
-<cite>[build-menu] Section</cite> but the key is prefixed by the name of the filetype
+<a class="reference" href="#build-menu-section">[build-menu] Section</a> but the key is prefixed by the name of the filetype
as it appears in the <tt class="docutils literal"><span class="pre">filetypes</span></tt> entry, eg the entry for the label of
filetype menu item 0 for the C filetype would be</p>
<blockquote>
@@ -5802,7 +5802,7 @@
<div class="footer">
<hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2009-10-22 11:20 UTC.
+Generated on: 2009-10-22 21:35 UTC.
Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
Modified: trunk/doc/geany.txt
===================================================================
--- trunk/doc/geany.txt 2009-10-22 11:28:59 UTC (rev 4354)
+++ trunk/doc/geany.txt 2009-10-22 21:38:37 UTC (rev 4355)
@@ -2276,7 +2276,7 @@
As long as a project is open, the Build menu will use
the items defined in project's settings, instead of the defaults.
-See `Build Menu Configuration` for information on configuring the menu.
+See `Build Menu Configuration`_ for information on configuring the menu.
The current project's settings are saved when it is closed, or when
Geany is shutdown. When restarting Geany, the previously opened project
@@ -2367,7 +2367,7 @@
.. tip::
If Geany's default error message parsing does not parse errors for
the tool you're using, you can set a custom regex in the Build Commands
- Dialog, see `Build Menu Configuration`
+ Dialog, see `Build Menu Configuration`_
Indicators
^^^^^^^^^^
@@ -2542,7 +2542,7 @@
commands dialog
The maximum numbers of items in each of the configurable groups can be
-configured when Geany starts using hidden settings(see `Preferences File Format`).
+configured when Geany starts using hidden settings(see `Preferences File Format`_).
Even though the maximum number of items may have been increased, only
those menu items that have values configured are shown in the menu.
@@ -2611,7 +2611,7 @@
* (Execute, Project File) and (Execute, Preferences) - the project filetype based execute
configuration and preferences non-filetype based execute can only be set by hand editing the
- appropriate file, see `Preferences File Format` and `Project File Format`.
+ appropriate file, see `Preferences File Format`_ and `Project File Format`_.
Build Menu Commands Dialog
^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -3951,7 +3951,7 @@
The [build-menu] section contains the configuration of the build menu.
This section can occur in filetype, preferences and project files and
always has the format described here. Different menu items are loaded
-from different files, see the table in the `Build Menu Configuration`
+from different files, see the table in the `Build Menu Configuration`_
section for details. All the settings can be configured from the dialogs
except the execute command in filetype files and filetype definitions in
the project file, so these are the only ones which need hand editing.
@@ -3998,7 +3998,7 @@
project file.
For each filetype the entries for that filetype have the format defined in
-`[build-menu] Section` but the key is prefixed by the name of the filetype
+`[build-menu] Section`_ but the key is prefixed by the name of the filetype
as it appears in the ``filetypes`` entry, eg the entry for the label of
filetype menu item 0 for the C filetype would be
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
Revision: 4354
http://geany.svn.sourceforge.net/geany/?rev=4354&view=rev
Author: ntrel
Date: 2009-10-22 11:28:59 +0000 (Thu, 22 Oct 2009)
Log Message:
-----------
Add 'Move line(s) up/down' keybindings.
Modified Paths:
--------------
trunk/ChangeLog
trunk/doc/geany.html
trunk/doc/geany.txt
trunk/src/keybindings.c
trunk/src/keybindings.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2009-10-22 11:04:45 UTC (rev 4353)
+++ trunk/ChangeLog 2009-10-22 11:28:59 UTC (rev 4354)
@@ -1,3 +1,9 @@
+2009-10-22 Nick Treleaven <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * src/keybindings.c, src/keybindings.h, doc/geany.txt, doc/geany.html:
+ Add 'Move line(s) up/down' keybindings.
+
+
2009-10-22 Lex Trotman <elextr.at.gmail.dot.com>
* src/build.c, src/build.h, src/filetypes.h:
Modified: trunk/doc/geany.html
===================================================================
--- trunk/doc/geany.html 2009-10-22 11:04:45 UTC (rev 4353)
+++ trunk/doc/geany.html 2009-10-22 11:28:59 UTC (rev 4354)
@@ -6,7 +6,7 @@
<meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
<title>Geany</title>
<meta name="authors" content="Enrico Tröger Nick Treleaven Frank Lanitz" />
-<meta name="date" content="2009-10-20" />
+<meta name="date" content="2009-10-22" />
<style type="text/css">
/*
@@ -139,7 +139,7 @@
<br />Nick Treleaven
<br />Frank Lanitz</td></tr>
<tr><th class="docinfo-name">Date:</th>
-<td>2009-10-20</td></tr>
+<td>2009-10-22</td></tr>
<tr><th class="docinfo-name">Version:</th>
<td>0.19</td></tr>
</tbody>
@@ -2843,8 +2843,8 @@
filetype.xxx file in
~/.config/geany/filedefs</p>
<p class="last">Saves To:
-geany.conf file in
-~/.config/geany</p>
+filetype.xxx file in
+~/.config/geany/filedefs</p>
</td>
<td><p class="first">Loads From:
filetype.xxx in
@@ -2870,9 +2870,9 @@
<li>(Non-Filetype, System Filetype) - although conceptually strange, defining
non-filetype commands in a filetype file, this provides the ability to
define filetype dependent default menu items.</li>
-<li>(Execute, Project File) and (Execute, Preferences) - the filetype based execute
-configuration can only be set by hand editing the appropriate file, see
-<cite>Preferences File Format</cite> and <cite>Project File Format</cite>.</li>
+<li>(Execute, Project File) and (Execute, Preferences) - the project filetype based execute
+configuration and preferences non-filetype based execute can only be set by hand editing the
+appropriate file, see <cite>Preferences File Format</cite> and <cite>Project File Format</cite>.</li>
</ul>
</div>
<div class="section">
@@ -3240,6 +3240,16 @@
the currently selected item up to the next word
part.</td>
</tr>
+<tr><td>Move line(s) up</td>
+<td> </td>
+<td>Move the current line or selected lines up by
+one line.</td>
+</tr>
+<tr><td>Move line(s) down</td>
+<td> </td>
+<td>Move the current line or selected lines down by
+one line.</td>
+</tr>
</tbody>
</table>
</div>
@@ -5792,7 +5802,7 @@
<div class="footer">
<hr class="footer" />
<a class="reference" href="geany.txt">View document source</a>.
-Generated on: 2009-10-20 16:54 UTC.
+Generated on: 2009-10-22 11:20 UTC.
Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
Modified: trunk/doc/geany.txt
===================================================================
--- trunk/doc/geany.txt 2009-10-22 11:04:45 UTC (rev 4353)
+++ trunk/doc/geany.txt 2009-10-22 11:28:59 UTC (rev 4354)
@@ -2609,8 +2609,8 @@
non-filetype commands in a filetype file, this provides the ability to
define filetype dependent default menu items.
-* (Execute, Project File) and (Execute, Preferences) - the project filetype based execute
- configuration and preferences non-filetype based execute can only be set by hand editing the
+* (Execute, Project File) and (Execute, Preferences) - the project filetype based execute
+ configuration and preferences non-filetype based execute can only be set by hand editing the
appropriate file, see `Preferences File Format` and `Project File Format`.
Build Menu Commands Dialog
@@ -2921,6 +2921,12 @@
Word part completion Tab When the autocompletion list is visible, complete
the currently selected item up to the next word
part.
+
+Move line(s) up Move the current line or selected lines up by
+ one line.
+
+Move line(s) down Move the current line or selected lines down by
+ one line.
=============================== ========================= ==================================================
Modified: trunk/src/keybindings.c
===================================================================
--- trunk/src/keybindings.c 2009-10-22 11:04:45 UTC (rev 4353)
+++ trunk/src/keybindings.c 2009-10-22 11:28:59 UTC (rev 4354)
@@ -287,6 +287,10 @@
GDK_Return, GDK_CONTROL_MASK, "edit_macrolist", _("Show macro list"), NULL);
keybindings_set_item(group, GEANY_KEYS_EDITOR_WORDPARTCOMPLETION, NULL,
GDK_Tab, 0, "edit_wordpartcompletion", _("Word part completion"), NULL);
+ keybindings_set_item(group, GEANY_KEYS_EDITOR_MOVELINEUP, NULL,
+ 0, 0, "edit_movelineup", _("Move line(s) up"), NULL);
+ keybindings_set_item(group, GEANY_KEYS_EDITOR_MOVELINEDOWN, NULL,
+ 0, 0, "edit_movelinedown", _("Move line(s) down"), NULL);
group = ADD_KB_GROUP(CLIPBOARD, _("Clipboard"), cb_func_clipboard_action);
@@ -1963,6 +1967,37 @@
}
+static void move_lines(GeanyEditor *editor, gboolean down)
+{
+ ScintillaObject *sci = editor->sci;
+ gchar *text;
+ gint pos, line, len;
+
+ sci_start_undo_action(sci);
+ editor_select_lines(editor, TRUE);
+ len = sci_get_selected_text_length(sci);
+
+ pos = sci_get_selection_start(sci);
+ line = sci_get_line_from_position(sci, pos);
+ if (down)
+ line++;
+ else
+ line--;
+
+ text = sci_get_selection_contents(sci);
+ sci_clear(sci);
+
+ pos = sci_get_position_from_line(sci, line);
+ sci_insert_text(sci, pos, text);
+ g_free(text);
+
+ sci_set_current_position(sci, pos, TRUE);
+ sci_set_selection_end(sci, pos + len - 2);
+
+ sci_end_undo_action(sci);
+}
+
+
/* common function for editor keybindings, only valid when scintilla has focus. */
static gboolean cb_func_editor_action(guint key_id)
{
@@ -2043,6 +2078,13 @@
}
case GEANY_KEYS_EDITOR_WORDPARTCOMPLETION:
return editor_complete_word_part(doc->editor);
+
+ case GEANY_KEYS_EDITOR_MOVELINEUP:
+ move_lines(doc->editor, FALSE);
+ break;
+ case GEANY_KEYS_EDITOR_MOVELINEDOWN:
+ move_lines(doc->editor, TRUE);
+ break;
}
return TRUE;
}
Modified: trunk/src/keybindings.h
===================================================================
--- trunk/src/keybindings.h 2009-10-22 11:04:45 UTC (rev 4353)
+++ trunk/src/keybindings.h 2009-10-22 11:28:59 UTC (rev 4354)
@@ -149,6 +149,8 @@
GEANY_KEYS_EDITOR_MACROLIST,
GEANY_KEYS_EDITOR_DELETELINETOEND,
GEANY_KEYS_EDITOR_WORDPARTCOMPLETION,
+ GEANY_KEYS_EDITOR_MOVELINEUP,
+ GEANY_KEYS_EDITOR_MOVELINEDOWN,
GEANY_KEYS_EDITOR_COUNT
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.