Branch: refs/heads/master
Author: Nick Treleaven <nick.treleaven(a)btinternet.com>
Committer: Nick Treleaven <nick.treleaven(a)btinternet.com>
Date: Wed, 28 Nov 2012 13:50:27 UTC
Commit: c4b245776151aa36a05fbc361ce2c2e3efd0279e
https://github.com/geany/geany/commit/c4b245776151aa36a05fbc361ce2c2e3efd02…
Log Message:
-----------
Fix clashing button mnemonic in detect/reload dialog (#3587465)
Modified Paths:
--------------
src/document.c
Modified: src/document.c
3 files changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -2847,9 +2847,10 @@ static void monitor_reload_file(GeanyDocument *doc)
gchar *base_name = g_path_get_basename(doc->file_name);
gint ret;
+ /* we use No instead of Cancel to avoid mnemonic clash */
ret = dialogs_show_prompt(NULL,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_NO, GTK_RESPONSE_CANCEL,
_("_Reload"), GTK_RESPONSE_ACCEPT,
_("Do you want to reload it?"),
_("The file '%s' on the disk is more recent than\nthe current buffer."),
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
Branch: refs/heads/master
Author: Nick Treleaven <nick.treleaven(a)btinternet.com>
Committer: Nick Treleaven <nick.treleaven(a)btinternet.com>
Date: Fri, 23 Nov 2012 15:39:50 UTC
Commit: 535b7a6b6e2c0b8e536a7e6d6ce82db92e06c8c1
https://github.com/geany/geany/commit/535b7a6b6e2c0b8e536a7e6d6ce82db92e06c…
Log Message:
-----------
Copy selected text only (when present) for Document->Clone
Modified Paths:
--------------
doc/geany.txt
src/document.c
Modified: doc/geany.txt
5 files changed, 3 insertions(+), 2 deletions(-)
===================================================================
@@ -568,8 +568,9 @@ shortcuts including for Most-Recently-Used document switching.
Cloning documents
^^^^^^^^^^^^^^^^^
The `Document->Clone` menu item copies the current document's text,
-cursor position and properties into a new untitled document. This
-can be useful when making temporary copies of text or for creating
+cursor position and properties into a new untitled document. If
+there is a selection, only the selected text is copied. This can be
+useful when making temporary copies of text or for creating
documents with similar or identical contents.
Modified: src/document.c
11 files changed, 7 insertions(+), 4 deletions(-)
===================================================================
@@ -2739,17 +2739,20 @@ GeanyDocument *document_index(gint idx)
/* create a new file and copy file content and properties */
G_MODULE_EXPORT void on_clone1_activate(GtkMenuItem *menuitem, gpointer user_data)
{
- gint len;
gchar *text;
GeanyDocument *doc;
GeanyDocument *old_doc = document_get_current();
+ ScintillaObject *old_sci;
if (!old_doc)
return;
- len = sci_get_length(old_doc->editor->sci) + 1;
- text = (gchar*) g_malloc(len);
- sci_get_text(old_doc->editor->sci, len, text);
+ old_sci = old_doc->editor->sci;
+ if (sci_has_selection(old_sci))
+ text = sci_get_selection_contents(old_sci);
+ else
+ text = sci_get_contents(old_sci, -1);
+
doc = document_new_file(NULL, old_doc->file_type, text);
g_free(text);
document_set_text_changed(doc, TRUE);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
Branch: refs/heads/master
Author: Nick Treleaven <nick.treleaven(a)btinternet.com>
Committer: Nick Treleaven <nick.treleaven(a)btinternet.com>
Date: Fri, 23 Nov 2012 15:37:08 UTC
Commit: 22d5b4795bdfc9bf5f0544d448e6d8cb8a852510
https://github.com/geany/geany/commit/22d5b4795bdfc9bf5f0544d448e6d8cb8a852…
Log Message:
-----------
Update manual for Document->Clone command
Modified Paths:
--------------
doc/geany.txt
Modified: doc/geany.txt
7 files changed, 7 insertions(+), 0 deletions(-)
===================================================================
@@ -565,6 +565,13 @@ order. It is not alphabetical as shown in the documents list
See the `Notebook tab keybindings`_ section for useful
shortcuts including for Most-Recently-Used document switching.
+Cloning documents
+^^^^^^^^^^^^^^^^^
+The `Document->Clone` menu item copies the current document's text,
+cursor position and properties into a new untitled document. This
+can be useful when making temporary copies of text or for creating
+documents with similar or identical contents.
+
Character sets and Unicode Byte-Order-Mark (BOM)
------------------------------------------------
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).