From 1bd1324a25184ed1eacf48ab6dc3558704905204 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Mon, 1 Feb 2010 21:54:09 -0600 Subject: [PATCH] FL: Make About_Dialog more dynamic. --- FL/About_Dialog.fl | 41 ++++++++++++++++++++--------------------- mixer/src/Mixer.C | 17 +++++++++++++++++ timeline/src/TLE.fl | 10 ++++++++++ 3 files changed, 47 insertions(+), 21 deletions(-) diff --git a/FL/About_Dialog.fl b/FL/About_Dialog.fl index 6306cc4..3b33e08 100644 --- a/FL/About_Dialog.fl +++ b/FL/About_Dialog.fl @@ -1,12 +1,12 @@ # data file for the Fltk User Interface Designer (fluid) -version 1.0110 -header_name {.H} +version 1.0110 +header_name {.H} code_name {.C} -decl {\#include } {} +decl {\#include } {} -decl {\#include } {} +decl {\#include } {} -decl {\#include } {} +decl {\#include } {} Function {open_url( const char *url )} {open return_type void } { @@ -19,12 +19,12 @@ Function {open_url( const char *url )} {open return_type void \#else fl_open_uri( url ); \#endif} {} -} +} class About_Dialog {open } { Function {About_Dialog( const char *logo_filename )} {} { - code { make_window( logo_filename );} {} + code {make_window( logo_filename );} {} } Function {run()} {return_type void } { @@ -45,8 +45,8 @@ if ( logo_box->image() ) { ((Fl_Shared_Image*)logo_box->image())->release(); logo_box->image( 0 ); -}} open selected - private xywh {1355 125 495 655} type Double xclass {Non-DAW} visible +}} open + private xywh {382 210 495 655} type Double xclass {Non-DAW} visible } { Fl_Tabs {} {open xywh {0 264 497 392} @@ -55,7 +55,7 @@ if ( logo_box->image() ) label Credits open xywh {2 293 492 362} } { - Fl_Box {} { + Fl_Box credits { label {Non-DAW was written from scratch by Jonathan Moore Liles for his own use (see the manual). @@ -71,8 +71,8 @@ with fast, light, reliable alternatives.} label License open xywh {2 288 492 311} hide } { - Fl_Box {} { - label {Copyright (C) 2008-2010 Jonathan Moore Liles} + Fl_Box copyright { + label COPYRIGHT xywh {43 302 410 37} labeltype SHADOW_LABEL labelfont 1 labelsize 18 } Fl_Box {} { @@ -86,13 +86,12 @@ You should have received a copy of the GNU General Public License along with thi } } Fl_Box logo_box { - label VERSION - private xywh {25 20 445 180} box ROUNDED_BOX color 48 labelfont 1 labelsize 18 align 16 - code0 { - Fl_Shared_Image *im = Fl_Shared_Image::get( logo_filename ); + label VERSION selected + xywh {25 20 445 180} box ROUNDED_BOX color 48 labelfont 1 labelsize 18 align 16 + code0 {Fl_Shared_Image *im = Fl_Shared_Image::get( logo_filename ); float iA = im->h() / im->w(); 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 ) );} code1 {o->label( VERSION );} } Fl_Return_Button {} { @@ -100,15 +99,15 @@ You should have received a copy of the GNU General Public License along with thi callback {o->window()->do_callback();} xywh {400 614 76 30} } - Fl_Button {} { + Fl_Button website_url { label {http://non-daw.tuxfamily.org} callback {open_url( o->label() );} xywh {125 614 245 30} color 14 labeltype SHADOW_LABEL labelcolor 6 } - Fl_Box {} { - label {The Non DAW (Digital Audio Workstation)} + Fl_Box title { + label TITLE xywh {32 221 430 29} labeltype SHADOW_LABEL labelfont 3 labelsize 17 } } } -} +} diff --git a/mixer/src/Mixer.C b/mixer/src/Mixer.C index c89f364..ce0b13f 100644 --- a/mixer/src/Mixer.C +++ b/mixer/src/Mixer.C @@ -178,6 +178,23 @@ void Mixer::cb_menu(Fl_Widget* o) { { 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(); } else if ( !strcmp( picked, "&Help/&Manual" )) diff --git a/timeline/src/TLE.fl b/timeline/src/TLE.fl index f2b7859..17d0ee8 100644 --- a/timeline/src/TLE.fl +++ b/timeline/src/TLE.fl @@ -609,6 +609,16 @@ timeline->redraw();} label {&About} 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();} xywh {0 0 40 25} } -- 2.11.4.GIT