Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Thompson <quornian@googlemail.com>2008-08-08 20:49:14 +0400
committerIan Thompson <quornian@googlemail.com>2008-08-08 20:49:14 +0400
commite9c92144d1e811e08a7d376d58c5d73236215974 (patch)
tree0955082cf4a0a88290050c131c567ab5259cc0e2 /source/blender/src/drawtext.c
parentd42891975b4b7c8a02c59c0567f68ce24e41f3e3 (diff)
Clipboard operations added to text editor RMB menu.
Diffstat (limited to 'source/blender/src/drawtext.c')
-rw-r--r--source/blender/src/drawtext.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/source/blender/src/drawtext.c b/source/blender/src/drawtext.c
index f8df4aa91d2..7ad5aa59202 100644
--- a/source/blender/src/drawtext.c
+++ b/source/blender/src/drawtext.c
@@ -2643,7 +2643,10 @@ void winqreadtextspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
}
} else if (event==RIGHTMOUSE) {
if (val) {
- p= pupmenu("File %t|New %x0|Open... %x1|Save %x2|Save As...%x3|Execute Script%x4");
+ if (txt_has_sel(text))
+ p= pupmenu("Text %t|Cut%x10|Copy%x11|Paste%x12|New %x0|Open... %x1|Save %x2|Save As...%x3|Execute Script%x4");
+ else
+ p= pupmenu("Text %t|Paste%x12|New %x0|Open... %x1|Save %x2|Save As...%x3|Execute Script%x4");
switch(p) {
case 0:
@@ -2669,7 +2672,28 @@ void winqreadtextspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
run_python_script(st);
do_draw= 1;
break;
- default:
+ case 10:
+ if (text && text->id.lib) {
+ error_libdata();
+ break;
+ }
+ txt_copy_clipboard(text);
+ txt_cut_sel(text);
+ pop_space_text(st);
+ do_draw= 1;
+ break;
+ case 11:
+ //txt_copy_sel(text);
+ txt_copy_clipboard(text);
+ break;
+ case 12:
+ if (text && text->id.lib) {
+ error_libdata();
+ break;
+ }
+ txt_paste_clipboard(text);
+ if (st->showsyntax) txt_format_text(st);
+ do_draw= 1;
break;
}
}