FL: Make About_Dialog more dynamic.

This commit is contained in:
Jonathan Moore Liles 2010-02-01 21:54:09 -06:00
parent 08b3bae9c8
commit 1bd1324a25
3 changed files with 47 additions and 21 deletions

View File

@ -45,8 +45,8 @@ if ( logo_box->image() )
{ {
((Fl_Shared_Image*)logo_box->image())->release(); ((Fl_Shared_Image*)logo_box->image())->release();
logo_box->image( 0 ); logo_box->image( 0 );
}} open selected }} open
private xywh {1355 125 495 655} type Double xclass {Non-DAW} visible private xywh {382 210 495 655} type Double xclass {Non-DAW} visible
} { } {
Fl_Tabs {} {open Fl_Tabs {} {open
xywh {0 264 497 392} xywh {0 264 497 392}
@ -55,7 +55,7 @@ if ( logo_box->image() )
label Credits open label Credits open
xywh {2 293 492 362} xywh {2 293 492 362}
} { } {
Fl_Box {} { Fl_Box credits {
label {Non-DAW was written from scratch by label {Non-DAW was written from scratch by
Jonathan Moore Liles for his own use Jonathan Moore Liles for his own use
(see the manual). (see the manual).
@ -71,8 +71,8 @@ with fast, light, reliable alternatives.}
label License open label License open
xywh {2 288 492 311} hide xywh {2 288 492 311} hide
} { } {
Fl_Box {} { Fl_Box copyright {
label {Copyright (C) 2008-2010 Jonathan Moore Liles} label COPYRIGHT
xywh {43 302 410 37} labeltype SHADOW_LABEL labelfont 1 labelsize 18 xywh {43 302 410 37} labeltype SHADOW_LABEL labelfont 1 labelsize 18
} }
Fl_Box {} { Fl_Box {} {
@ -86,10 +86,9 @@ You should have received a copy of the GNU General Public License along with thi
} }
} }
Fl_Box logo_box { Fl_Box logo_box {
label VERSION label VERSION selected
private xywh {25 20 445 180} box ROUNDED_BOX color 48 labelfont 1 labelsize 18 align 16 xywh {25 20 445 180} box ROUNDED_BOX color 48 labelfont 1 labelsize 18 align 16
code0 { code0 {Fl_Shared_Image *im = Fl_Shared_Image::get( logo_filename );
Fl_Shared_Image *im = Fl_Shared_Image::get( logo_filename );
float iA = im->h() / im->w(); float iA = im->h() / im->w();
int oH = o->h() - 18; int oH = o->h() - 18;
o->image( Fl_Shared_Image::get( logo_filename, iA * oH, oH ) );} o->image( Fl_Shared_Image::get( logo_filename, iA * oH, oH ) );}
@ -100,13 +99,13 @@ You should have received a copy of the GNU General Public License along with thi
callback {o->window()->do_callback();} callback {o->window()->do_callback();}
xywh {400 614 76 30} xywh {400 614 76 30}
} }
Fl_Button {} { Fl_Button website_url {
label {http://non-daw.tuxfamily.org} label {http://non-daw.tuxfamily.org}
callback {open_url( o->label() );} callback {open_url( o->label() );}
xywh {125 614 245 30} color 14 labeltype SHADOW_LABEL labelcolor 6 xywh {125 614 245 30} color 14 labeltype SHADOW_LABEL labelcolor 6
} }
Fl_Box {} { Fl_Box title {
label {The Non DAW (Digital Audio Workstation)} label TITLE
xywh {32 221 430 29} labeltype SHADOW_LABEL labelfont 3 labelsize 17 xywh {32 221 430 29} labeltype SHADOW_LABEL labelfont 3 labelsize 17
} }
} }

View File

@ -178,6 +178,23 @@ void Mixer::cb_menu(Fl_Widget* o) {
{ {
About_Dialog ab( PIXMAP_PATH "/non-mixer/logo.png" ); About_Dialog ab( PIXMAP_PATH "/non-mixer/logo.png" );
ab.logo_box->label( VERSION );
ab.title->label( "The Non Mixer" );
ab.copyright->label( "Copyright (C) 2008-2010 Jonathan Moore Liles" );
ab.credits->label(
"Non-Mixer was written from scratch by\n"
"Jonathan Moore Liles for his own use\n"
"(see the manual).\n"
"\n"
"Nobody planned. Nobody helped.\n"
"You can help now by donating time, money,\n"
"and/or replacing the rest of Linux Audio\n"
"with fast, light, reliable alternatives.\n" );
ab.website_url->label( "http://non-mixer.tuxfamily.org" );
ab.run(); ab.run();
} }
else if ( !strcmp( picked, "&Help/&Manual" )) else if ( !strcmp( picked, "&Help/&Manual" ))

View File

@ -609,6 +609,16 @@ timeline->redraw();}
label {&About} label {&About}
callback {About_Dialog ab( PIXMAP_PATH "/non-daw/logo.png" ); callback {About_Dialog ab( PIXMAP_PATH "/non-daw/logo.png" );
ab.logo_box->label( VERSION );
ab.title->label( "The Non DAW (Digital Audio Workstation)" );
ab.copyright->label( "Copyright (C) 2008-2010 Jonathan Moore Liles" );
ab.credits->label( "Non-DAW was written from scratch by\\nJonathan Moore Liles for his own use\\n(see the manual).\\n\\nNobody planned. Nobody helped.\\nYou can help now by donating time, money,\\nand/or replacing the rest of Linux Audio\\nwith fast, light, reliable alternatives.\\n" );
ab.website_url->label( "http://non-daw.tuxfamily.org" );
ab.run();} ab.run();}
xywh {0 0 40 25} xywh {0 0 40 25}
} }