Changeset 1744


Ignore:
Timestamp:
Apr 13, 2013, 4:53:17 PM (4 years ago)
Author:
bruno
Message:
  • Adds an eject button at end to avoid switching window just for that.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • projects/CDDBeditor/devel/CDDBeditor/bin/CDDBeditor

    r1650 r1744  
    497497        $flag = NEWT_FLAG_WRAP|NEWT_ENTRY_SCROLL;
    498498        $track_entry[$n] = Newt::Entry($width, $flag, $ce_cd->{track}[$n]);
    499         $ce_panel->Add(0, 9+$n, $track_label);
     499        $flage = NEWT_ANCHOR_RIGHT;
     500        $ce_panel->Add(0, 9+$n, $track_label,$flage);
     501        $flage = NEWT_ANCHOR_LEFT;
    500502        $ce_panel->Add(1, 9+$n, $track_entry[$n], $flage);
    501503        $ce_panel->Add(2, 9+$n, $dur_label, $flage);
     
    504506    $ce_panel->Add(0, 9+$n, $empty_label);
    505507
    506     $ce_panel->Add(0, 9+$n+1, $send_button);
    507     $ce_panel->Add(1, 9+$n+1, $reload_button);
    508     $ce_panel->Add(2, 9+$n+1, $quit_button);
     508    my $eject_button = Newt::Button("Eject");
     509    $eject_button->Tag("Eject");
     510    my $ce_panel_button = Newt::Panel(4, $width);
     511    $flage = NEWT_ANCHOR_LEFT;
     512    $ce_panel_button->Add(0, 1, $send_button,$flage, 3, 0, 3, 0);
     513    $ce_panel_button->Add(1, 1, $reload_button, $flage, 3, 0, 3, 0);
     514    $flage = NEWT_ANCHOR_RIGHT;
     515    $ce_panel_button->Add(2, 1, $quit_button, $flage, 3, 0, 3, 0);
     516    $ce_panel_button->Add(3, 1, $eject_button,$flage, 3, 0, 3, 0);
     517    $ce_panel->Add(0, 9+$n+1, $empty_label);
     518    $ce_panel->Add(1, 9+$n+1, $ce_panel_button);
    509519   
    510520    Newt::Cls();
     
    527537    Newt::Cls();
    528538    cddbe_exit(0) if ($data->Tag() eq "Quit");
     539    system("eject ".$ce_config{"CD_DEVICE"}) if ($data->Tag() eq "Eject");
    529540
    530541    pb_log(1,"Before sending\n");
Note: See TracChangeset for help on using the changeset viewer.