Browse Source

Provide a keybinding/menu entry for track renaming.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
869cf25b3b
3 changed files with 14 additions and 4 deletions
  1. +9
    -3
      FL/Fl_Sometimes_Input.H
  2. +5
    -0
      Timeline/Track.C
  3. +0
    -1
      Timeline/Track.H

+ 9
- 3
FL/Fl_Sometimes_Input.H View File

@@ -48,6 +48,14 @@ public:
} }
} }


virtual void
take_focus ( void )
{
set_visible_focus();
Fl_Widget::take_focus();
clear_visible_focus();
}

virtual int virtual int
handle ( int m ) handle ( int m )
{ {
@@ -59,11 +67,9 @@ public:
redraw(); redraw();
return 1; return 1;
case FL_PUSH: case FL_PUSH:
set_visible_focus();
take_focus(); take_focus();
clear_visible_focus();
redraw(); redraw();
return r;
return 1;
case FL_UNFOCUS: case FL_UNFOCUS:


if ( window() ) if ( window() )


+ 5
- 0
Timeline/Track.C View File

@@ -653,6 +653,10 @@ Track::menu_cb ( const Fl_Menu_ *m )
Fl::delete_widget( this ); Fl::delete_widget( this );
} }
} }
else if ( ! strcmp( picked, "/Rename" ) )
{
((Fl_Sometimes_Input*)name_field)->take_focus();
}
} }


#include "FL/menu_popup.H" #include "FL/menu_popup.H"
@@ -676,6 +680,7 @@ Track::menu ( void ) const
{ "Add Control", 0, 0, 0 }, { "Add Control", 0, 0, 0 },
{ "Add Annotation", 0, 0, 0 }, { "Add Annotation", 0, 0, 0 },
{ "Color", 0, 0, 0 }, { "Color", 0, 0, 0 },
{ "Rename", FL_CTRL + 'n', 0, 0 },
{ "Remove", 0, 0, 0 }, // transport->rolling ? FL_MENU_INACTIVE : 0 }, { "Remove", 0, 0, 0 }, // transport->rolling ? FL_MENU_INACTIVE : 0 },
{ 0 }, { 0 },
}; };


+ 0
- 1
Timeline/Track.H View File

@@ -48,7 +48,6 @@ class Port;
class Audio_Region; class Audio_Region;
class Audio_File; class Audio_File;



//class Audio_Sequence; //class Audio_Sequence;


#include "Audio_Sequence.H" #include "Audio_Sequence.H"


Loading…
Cancel
Save