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
path: root/source
diff options
context:
space:
mode:
authorRob Haarsma <phaseIV@zonnet.nl>2003-01-23 19:38:12 +0300
committerRob Haarsma <phaseIV@zonnet.nl>2003-01-23 19:38:12 +0300
commit219e8e3846fe09fd4d57cbab5ab68baf401bc776 (patch)
tree4a538c0d9c13e3d1dca2f8cd4e41bf7b45eec871 /source
parent5ff1376b37be895680efea330135baedceb9725e (diff)
added headerbutton for drawing of linenumbers
Diffstat (limited to 'source')
-rw-r--r--source/blender/src/headerbuttons.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/src/headerbuttons.c b/source/blender/src/headerbuttons.c
index 74b01bef6d8..bbfdeb99fb7 100644
--- a/source/blender/src/headerbuttons.c
+++ b/source/blender/src/headerbuttons.c
@@ -4799,6 +4799,16 @@ void do_text_buttons(unsigned short event)
allqueue(REDRAWHEADERS, 0);
break;
*/
+ case B_TEXTLINENUM:
+ if(st->showlinenrs)
+ st->showlinenrs = 0;
+ else
+ st->showlinenrs = 1;
+
+ allqueue(REDRAWTEXT, 0);
+ allqueue(REDRAWHEADERS, 0);
+ break;
+
case B_TEXTFONT:
switch(st->font_id) {
case 0:
@@ -4835,6 +4845,11 @@ void text_buttons(void)
if(curarea->full) uiDefIconBut(block, BUT,B_FULL, ICON_SPLITSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Restore smaller windows (CTRL+Up arrow)");
else uiDefIconBut(block, BUT,B_FULL, ICON_FULLSCREEN, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Make fullscreen window (CTRL+Down arrow)");
+ if(st->showlinenrs)
+ uiDefIconBut(block, BUT, B_TEXTLINENUM, ICON_SHORTDISPLAY, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Hide line numbers");
+ else
+ uiDefIconBut(block, BUT, B_TEXTLINENUM, ICON_LONGDISPLAY, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Display line numbers");
+
/* STD TEXT BUTTONS */
if (!BPY_spacetext_is_pywin(st)) {