Add Project_Info_Dialog.
This commit is contained in:
parent
a842c129ad
commit
5e5e79b412
|
@ -161,9 +161,9 @@ Loggable::progress_callback( &TLE::progress_cb, this );} {}
|
||||||
} {
|
} {
|
||||||
Fl_Window main_window {
|
Fl_Window main_window {
|
||||||
label Timeline open
|
label Timeline open
|
||||||
xywh {894 189 1025 770} type Double resizable xclass Non_DAW visible
|
xywh {254 189 1025 770} type Double resizable xclass Non_DAW visible
|
||||||
} {
|
} {
|
||||||
Fl_Menu_Bar menubar {
|
Fl_Menu_Bar menubar {open
|
||||||
xywh {0 0 1024 25}
|
xywh {0 0 1024 25}
|
||||||
} {
|
} {
|
||||||
Submenu {} {
|
Submenu {} {
|
||||||
|
@ -172,6 +172,9 @@ Loggable::progress_callback( &TLE::progress_cb, this );} {}
|
||||||
} {
|
} {
|
||||||
MenuItem {} {
|
MenuItem {} {
|
||||||
label {&Info}
|
label {&Info}
|
||||||
|
callback {Project_Info_Dialog pi;
|
||||||
|
|
||||||
|
pi.run();}
|
||||||
xywh {0 0 40 25} deactivate
|
xywh {0 0 40 25} deactivate
|
||||||
}
|
}
|
||||||
MenuItem {} {
|
MenuItem {} {
|
||||||
|
@ -704,8 +707,7 @@ if ( engine->zombified() && ! zombie )
|
||||||
{
|
{
|
||||||
zombie = true;
|
zombie = true;
|
||||||
fl_alert( "Disconnected from JACK!" );
|
fl_alert( "Disconnected from JACK!" );
|
||||||
}} {selected
|
}} {}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Function {update_cb( void *v )} {return_type {static void}
|
Function {update_cb( void *v )} {return_type {static void}
|
||||||
} {
|
} {
|
||||||
|
@ -855,7 +857,7 @@ while ( _window->shown() )
|
||||||
} {
|
} {
|
||||||
Fl_Window _window {
|
Fl_Window _window {
|
||||||
label {New Project} open
|
label {New Project} open
|
||||||
xywh {619 742 550 195} type Double modal xclass Non_DAW visible
|
xywh {384 630 550 195} type Double modal xclass Non_DAW visible
|
||||||
} {
|
} {
|
||||||
Fl_File_Input _name {
|
Fl_File_Input _name {
|
||||||
label {Named:}
|
label {Named:}
|
||||||
|
@ -914,3 +916,74 @@ Function {new_project_chooser()} {open C return_type void
|
||||||
|
|
||||||
nsd.run();} {}
|
nsd.run();} {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class Project_Info_Dialog {open
|
||||||
|
} {
|
||||||
|
Function {Project_Info_Dialog()} {open
|
||||||
|
} {
|
||||||
|
code {make_window();} {}
|
||||||
|
}
|
||||||
|
Function {run()} {open return_type void
|
||||||
|
} {
|
||||||
|
code {_window->show();
|
||||||
|
|
||||||
|
while ( _window->shown() )
|
||||||
|
Fl::wait();} {}
|
||||||
|
}
|
||||||
|
Function {make_window()} {open
|
||||||
|
} {
|
||||||
|
Fl_Window _window {
|
||||||
|
label {Project info} open selected
|
||||||
|
xywh {623 64 550 625} type Double visible
|
||||||
|
} {
|
||||||
|
Fl_Value_Output {} {
|
||||||
|
label {Sample Rate}
|
||||||
|
xywh {25 35 90 25} labeltype SHADOW_LABEL align 1
|
||||||
|
code0 {o->value( timeline->sample_rate() );}
|
||||||
|
}
|
||||||
|
Fl_Text_Editor notes_field {
|
||||||
|
label {Notes:}
|
||||||
|
private xywh {20 395 510 185} color 47 selection_color 31 textsize 18 textcolor 92
|
||||||
|
code0 {o->buffer( new Fl_Text_Buffer() );}
|
||||||
|
code1 {o->buffer()->loadfile( "notes" );}
|
||||||
|
}
|
||||||
|
Fl_Group {} {open
|
||||||
|
xywh {145 95 260 75} hide
|
||||||
|
} {
|
||||||
|
Fl_Input {} {
|
||||||
|
label {Engineer:}
|
||||||
|
xywh {145 95 260 25} align 1
|
||||||
|
}
|
||||||
|
Fl_Input {} {
|
||||||
|
label {Performer:}
|
||||||
|
xywh {145 145 260 25} align 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Fl_Output {} {
|
||||||
|
label {Size of Journal}
|
||||||
|
xywh {220 35 100 25} box UP_BOX labeltype SHADOW_LABEL align 1
|
||||||
|
code0 {static char pat[40];}
|
||||||
|
code1 {snprintf( pat, sizeof( pat ), "%.1fK", size( "history" ) / (float)1024 );}
|
||||||
|
code2 {o->value( pat );}
|
||||||
|
code3 {\#include "util/file.h"}
|
||||||
|
}
|
||||||
|
Fl_Output {} {
|
||||||
|
label {Created On}
|
||||||
|
xywh {380 35 135 25} box UP_BOX labeltype SHADOW_LABEL align 1
|
||||||
|
}
|
||||||
|
Fl_Box {} {
|
||||||
|
label {<LOGO>}
|
||||||
|
xywh {52 194 445 153} box ROUNDED_BOX color 53 labelfont 1 labelsize 18 align 16
|
||||||
|
code0 {o->image( Fl_Shared_Image::get( INSTALL_PREFIX "/share/pixmaps/non-daw/logo2.png" ) );}
|
||||||
|
code1 {o->label( NULL );}
|
||||||
|
}
|
||||||
|
Fl_Button {} {
|
||||||
|
label Save
|
||||||
|
callback {notes_field->buffer()->savefile( "notes" );
|
||||||
|
|
||||||
|
_window->hide();}
|
||||||
|
xywh {455 590 74 25}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
13
util/file.C
13
util/file.C
|
@ -21,7 +21,7 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
long
|
unsigned long
|
||||||
mtime ( const char *file )
|
mtime ( const char *file )
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
@ -38,3 +38,14 @@ newer ( const char *file1, const char *file2 )
|
||||||
{
|
{
|
||||||
return mtime( file1 ) > mtime( file2 );
|
return mtime( file1 ) > mtime( file2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned long
|
||||||
|
size ( const char *file )
|
||||||
|
{
|
||||||
|
struct stat st;
|
||||||
|
|
||||||
|
if ( stat( file, &st ) )
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return st.st_size;
|
||||||
|
}
|
||||||
|
|
|
@ -17,5 +17,6 @@
|
||||||
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
/*******************************************************************************/
|
/*******************************************************************************/
|
||||||
|
|
||||||
long mtime ( const char *file );
|
unsigned long mtime ( const char *file );
|
||||||
bool newer ( const char *file1, const char *file2 );
|
bool newer ( const char *file1, const char *file2 );
|
||||||
|
unsigned long size ( const char *file );
|
||||||
|
|
Loading…
Reference in New Issue