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:
authorTon Roosendaal <ton@blender.org>2003-11-24 00:31:35 +0300
committerTon Roosendaal <ton@blender.org>2003-11-24 00:31:35 +0300
commit4cd72d69c13c30753035482ef96547c95552f4fc (patch)
tree33237d2ad7286d50686772f4d1d19f06618f79ec
parent5a5ab6233610f5296524275e348c318c6e633f4f (diff)
- ALT+N in new texteditor (no text block) will add new text now.
-rw-r--r--source/blender/src/drawtext.c45
1 files changed, 27 insertions, 18 deletions
diff --git a/source/blender/src/drawtext.c b/source/blender/src/drawtext.c
index 7402e29ea39..e8079c83c7e 100644
--- a/source/blender/src/drawtext.c
+++ b/source/blender/src/drawtext.c
@@ -995,7 +995,22 @@ void winqreadtextspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
text= st->text;
if (!text) {
- if (event==RIGHTMOUSE) {
+ if (event==RIGHTMOUSE) {
+ switch (pupmenu("File %t|New %x0|Open... %x1")) {
+ case 0:
+ st->text= add_empty_text();
+ st->top= 0;
+
+ allqueue(REDRAWTEXT, 0);
+ allqueue(REDRAWHEADERS, 0);
+ break;
+ case 1:
+ activate_fileselect(FILE_SPECIAL, "LOAD TEXT FILE", G.sce, add_text_fs);
+ break;
+ }
+ }
+ if (val && !ELEM(G.qual, 0, LR_SHIFTKEY)) {
+ if (event==FKEY && (G.qual & LR_ALTKEY) && (G.qual & LR_SHIFTKEY)) {
switch (pupmenu("File %t|New %x0|Open... %x1")) {
case 0:
st->text= add_empty_text();
@@ -1008,26 +1023,20 @@ void winqreadtextspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
activate_fileselect(FILE_SPECIAL, "LOAD TEXT FILE", G.sce, add_text_fs);
break;
}
+ }
+ else if (event==QKEY) {
+ if(okee("QUIT BLENDER")) exit_usiblender();
}
- if (val && !ELEM(G.qual, 0, LR_SHIFTKEY)) {
- if (event==FKEY && (G.qual & LR_ALTKEY) && (G.qual & LR_SHIFTKEY)) {
- switch (pupmenu("File %t|New %x0|Open... %x1")) {
- case 0:
+ else if (event==NKEY) {
+ if (G.qual & LR_ALTKEY) {
st->text= add_empty_text();
st->top= 0;
allqueue(REDRAWTEXT, 0);
allqueue(REDRAWHEADERS, 0);
- break;
- case 1:
- activate_fileselect(FILE_SPECIAL, "LOAD TEXT FILE", G.sce, add_text_fs);
- break;
- }
- } else if (event==QKEY) {
- if(okee("QUIT BLENDER")) exit_usiblender();
+ }
}
}
-
return;
}
@@ -1273,11 +1282,11 @@ void winqreadtextspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
case NKEY:
if (G.qual & LR_ALTKEY) {
- st->text= add_empty_text();
- st->top= 0;
-
- allqueue(REDRAWTEXT, 0);
- allqueue(REDRAWHEADERS, 0);
+ st->text= add_empty_text();
+ st->top= 0;
+
+ allqueue(REDRAWTEXT, 0);
+ allqueue(REDRAWHEADERS, 0);
}
break;