Browse Source

NSM: Tweak GUI appearance. Move 'Add client' button to avoid confusion. Closes #33.

tags/non-daw-v1.2.0
Jonathan Moore Liles 12 years ago
parent
commit
6a8a2d6e38
1 changed files with 42 additions and 31 deletions
  1. +42
    -31
      session-manager/src/session-manager.C

+ 42
- 31
session-manager/src/session-manager.C View File

@@ -184,7 +184,7 @@ public:
_kill_button->hide(); _kill_button->hide();
_gui->deactivate(); _gui->deactivate();
_dirty->deactivate(); _dirty->deactivate();
color( fl_darker( FL_RED ) );
color( fl_color_average( FL_BLACK, FL_RED, 0.50 ) );
redraw(); redraw();
} }
else else
@@ -213,14 +213,14 @@ public:
if ( ! strcmp( command, "ready" ) ) if ( ! strcmp( command, "ready" ) )
{ {
color( FL_LIGHT1 );
color( fl_color_average( FL_BLACK, FL_GREEN, 0.50 ) );
_progress->value( 0.0f ); _progress->value( 0.0f );
} }
else if ( ! strcmp( command, "quit" ) || else if ( ! strcmp( command, "quit" ) ||
! strcmp( command, "kill" ) || ! strcmp( command, "kill" ) ||
! strcmp( command, "error" ) ) ! strcmp( command, "error" ) )
{ {
color( fl_darker( FL_RED ) );
color( fl_color_average( FL_BLACK, FL_RED, 0.50 ) );
} }
else if ( ! strcmp( command, "stopped" ) ) else if ( ! strcmp( command, "stopped" ) )
{ {
@@ -228,7 +228,7 @@ public:
} }
else else
{ {
color( fl_darker( FL_YELLOW ) );
color( fl_color_average( FL_BLACK, FL_YELLOW, 0.50 ) );
} }


redraw(); redraw();
@@ -446,6 +446,7 @@ public:
Fl_Button *new_button; Fl_Button *new_button;
Fl_Button *add_button; Fl_Button *add_button;
Fl_Button *duplicate_button; Fl_Button *duplicate_button;
Fl_Box *session_name_box;


Fl_Tree *session_browser; Fl_Tree *session_browser;
@@ -653,16 +654,13 @@ public:


const char *session_name ( void ) const const char *session_name ( void ) const
{ {
return clients_pack->parent()->label();
return session_name_box->label();
} }


void void
session_name ( const char *name ) session_name ( const char *name )
{ {
if ( clients_pack->label() )
free( (char*)clients_pack->label() );
clients_pack->parent()->label( strdup( name ) );
session_name_box->copy_label( name );
if ( strlen( name ) ) if ( strlen( name ) )
{ {
@@ -800,15 +798,10 @@ public:
o->box( FL_UP_BOX ); o->box( FL_UP_BOX );
o->callback( cb_handle, (void*)this ); o->callback( cb_handle, (void*)this );
} }
{ Fl_Button *o = add_button = new Fl_Button( 0, 0, 100, 100, "&Add Client" );
o->shortcut( FL_CTRL | 'a' );
o->box( FL_UP_BOX );
o->callback( cb_handle, (void*)this );
}

o->end(); o->end();
add(o);
} }

{ Fl_Tile *o = new Fl_Tile( X, Y + 50, W, H - 50 ); { Fl_Tile *o = new Fl_Tile( X, Y + 50, W, H - 50 );
{ {
Fl_Tree *o = session_browser = new Fl_Tree( X, Y + 50, W / 3, H - 50 ); Fl_Tree *o = session_browser = new Fl_Tree( X, Y + 50, W / 3, H - 50 );
@@ -821,26 +814,44 @@ public:
o->selection_color( fl_darker( FL_GREEN ) ); o->selection_color( fl_darker( FL_GREEN ) );
o->box( FL_DOWN_BOX ); o->box( FL_DOWN_BOX );
o->label( "Sessions" ); o->label( "Sessions" );
}
{
Fl_Packscroller *o = new Fl_Packscroller( X + ( W / 3 ), Y + 50, ( W / 3 ) * 2, H - 50 );
o->align( FL_ALIGN_TOP );
o->labeltype( FL_SHADOW_LABEL );
o->end();
} // Fl_Tree
Fl_Scalepack *scalepack;
{ Fl_Scalepack *o = scalepack = new Fl_Scalepack( X + ( W / 3 ), Y + 50, ( W / 3 ) * 2, H - 50 );
o->type( FL_VERTICAL );
o->spacing( 2 );
{ session_name_box = new Fl_Box( 0, 0, 100, 25, "" );
}

{ Fl_Button *o = add_button = new Fl_Button( 0, 0, 100, 25, "&Add Client to Session" );
o->shortcut( FL_CTRL | 'a' );
o->box( FL_UP_BOX );
o->callback( cb_handle, (void*)this );
}
{ {
Fl_Pack *o = clients_pack = new Fl_Pack( X + ( W / 3 ), Y + 50, ( W / 3 ) * 2, H - 50 );
Fl_Packscroller *o = new Fl_Packscroller( 0, 0, 100, H - 100 );
o->align( FL_ALIGN_TOP ); o->align( FL_ALIGN_TOP );
o->spacing( 2 );
o->type( Fl_Pack::VERTICAL );
o->labeltype( FL_SHADOW_LABEL );
{
Fl_Pack *o = clients_pack = new Fl_Pack( 0, 0, 100, 100 );
o->align( FL_ALIGN_TOP );
o->spacing( 2 );
o->type( Fl_Pack::VERTICAL );
o->end();
}
o->end(); o->end();
}
Fl_Group::current()->resizable( o );
Fl_Group::current()->resizable( o );
} // Fl_Packscroller
o->end(); o->end();
}
resizable( o );
Fl_Group::current()->resizable( o );
} // Fl_Scalepack
o->end(); o->end();
}

// Fl_Group::current()->resizable( this );
resizable( o );
} // Fl_tile


end(); end();




Loading…
Cancel
Save