- Timestamp:
- Sep 8, 2009, 1:52:47 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
projects/CDDBeditor/bin/CDDBeditor
r846 r847 18 18 use Mail::Sendmail; 19 19 use POSIX qw(strftime :sys_wait_h); 20 use Newt qw(NEWT_FLAG_WRAP NEWT_ENTRY_SCROLL NEWT_ANCHOR_LEFT :entry :textbox :macros);20 use Newt qw(NEWT_FLAG_WRAP NEWT_ENTRY_SCROLL NEWT_ANCHOR_LEFT NEWT_ANCHOR_RIGHT :entry :textbox :macros); 21 21 use lib qw (lib); 22 22 use locale; … … 142 142 my $ce_help = "(c) Bruno Cornec 2009 - All right reversed under the GPL v2"; 143 143 my $artist_label = Newt::Label("Artist: "); 144 my $data_label = Newt::Label("Data: "); 145 my $raw_label = Newt::Label("Raw: "); 144 my $empty_label = Newt::Label(" "); 145 #my $data_label = Newt::Label("Data: "); 146 #my $raw_label = Newt::Label("Raw: "); 146 147 my $title_label = Newt::Label("Title: "); 147 148 my $year_label = Newt::Label("Year: "); … … 152 153 my $tr_track_label = Newt::Label("Track"); 153 154 my $tr_frames_label = Newt::Label("Frames"); 154 my $tno_label = Newt::Label("Track #: ");155 my $tno_label = Newt::Label("Track #: "); 155 156 my $tr_title_label = Newt::Label("Title"); 156 157 my $tr_author_label = Newt::Label("Author"); … … 212 213 213 214 my $ce_panel = Newt::Panel(2, 20, "CDDBeditor Configuration"); 214 my $flage = NEWT_ANCHOR_LEFT; 215 $ce_panel->Add(0, 0, $host_label); 215 my $flage = NEWT_ANCHOR_RIGHT; 216 $ce_panel->Add(0, 0, $host_label,$flage); 217 $flage = NEWT_ANCHOR_LEFT; 216 218 $ce_panel->Add(1, 0, $host_entry, $flage); 217 $ce_panel->Add(0, 1, $port_label); 219 $flage = NEWT_ANCHOR_RIGHT; 220 $ce_panel->Add(0, 1, $port_label,$flage); 221 $flage = NEWT_ANCHOR_LEFT; 218 222 $ce_panel->Add(1, 1, $port_entry, $flage); 219 $ce_panel->Add(0, 2, $mode_label); 223 $flage = NEWT_ANCHOR_RIGHT; 224 $ce_panel->Add(0, 2, $mode_label,$flage); 225 $flage = NEWT_ANCHOR_LEFT; 220 226 $ce_panel->Add(1, 2, $mode_group, $flage); 221 $ce_panel->Add(0, 3, $proxy_label); 227 $flage = NEWT_ANCHOR_RIGHT; 228 $ce_panel->Add(0, 3, $proxy_label,$flage); 229 $flage = NEWT_ANCHOR_LEFT; 222 230 $ce_panel->Add(1, 3, $proxy_entry, $flage); 223 $ce_panel->Add(0, 4, $dev_label); 231 $flage = NEWT_ANCHOR_RIGHT; 232 $ce_panel->Add(0, 4, $dev_label,$flage); 233 $flage = NEWT_ANCHOR_LEFT; 224 234 $ce_panel->Add(1, 4, $dev_entry, $flage); 225 $ce_panel->Add(0, 5, $user_label); 235 $flage = NEWT_ANCHOR_RIGHT; 236 $ce_panel->Add(0, 5, $user_label,$flage); 237 $flage = NEWT_ANCHOR_LEFT; 226 238 $ce_panel->Add(1, 5, $user_group, $flage); 227 $ce_panel->Add(0, 6, $next_button); 228 $ce_panel->Add(1, 6, $quit_button); 239 $ce_panel->Add(0, 6, $empty_label); 240 $ce_panel->Add(0, 7, $next_button); 241 $ce_panel->Add(1, 7, $quit_button); 229 242 230 243 Newt::Refresh(); … … 264 277 # Modify enconding of some fields 265 278 $ce_cd{artist} = decode("iso8859-1",$ce_cd{artist}); 266 $ce_cd{title} = decode("iso8859-1",$ce_cd{ artist});279 $ce_cd{title} = decode("iso8859-1",$ce_cd{title}); 267 280 268 281 # Third panel to display CD Infos … … 277 290 my $category_entry = Newt::Entry($width, $flag, $ce_cd{cat}); 278 291 my $genre_entry = Newt::Entry($width, $flag, $ce_cd{genre}); 279 my $data_entry = Newt::Entry($width, $flag, Dumper(@{$ce_cd{data}}));280 my $raw_entry = Newt::Entry($width, $flag, Dumper(@{$ce_cd{raw}}));292 #my $data_entry = Newt::Entry($width, $flag, Dumper(@{$ce_cd{data}})); 293 #my $raw_entry = Newt::Entry($width, $flag, Dumper(@{$ce_cd{raw}})); 281 294 my $tno_entry = Newt::Label($ce_cd{tno}); 282 295 $width = 5; … … 285 298 # Build interface 286 299 $ce_panel = Newt::Panel(3, $ce_sh, "CDDB Info"); 287 $ce_panel->Add(0, 0, $artist_label); 300 $flage = NEWT_ANCHOR_RIGHT; 301 $ce_panel->Add(0, 0, $artist_label,$flage); 302 $flage = NEWT_ANCHOR_LEFT; 288 303 $ce_panel->Add(1, 0, $artist_entry, $flage); 289 $ce_panel->Add(0, 1, $title_label); 304 $flage = NEWT_ANCHOR_RIGHT; 305 $ce_panel->Add(0, 1, $title_label,$flage); 306 $flage = NEWT_ANCHOR_LEFT; 290 307 $ce_panel->Add(1, 1, $title_entry, $flage); 291 $ce_panel->Add(0, 2, $year_label); 308 $flage = NEWT_ANCHOR_RIGHT; 309 $ce_panel->Add(0, 2, $year_label,$flage); 310 $flage = NEWT_ANCHOR_LEFT; 292 311 $ce_panel->Add(1, 2, $year_entry, $flage); 293 $ce_panel->Add(0, 3, $category_label); 312 $flage = NEWT_ANCHOR_RIGHT; 313 $ce_panel->Add(0, 3, $category_label,$flage); 314 $flage = NEWT_ANCHOR_LEFT; 294 315 $ce_panel->Add(1, 3, $category_entry, $flage); 295 $ce_panel->Add(0, 4, $genre_label); 316 $flage = NEWT_ANCHOR_RIGHT; 317 $ce_panel->Add(0, 4, $genre_label,$flage); 318 $flage = NEWT_ANCHOR_LEFT; 296 319 $ce_panel->Add(1, 4, $genre_entry, $flage); 297 $ce_panel->Add(0, 5, $data_label); 298 $ce_panel->Add(1, 5, $data_entry, $flage); 299 $ce_panel->Add(0, 6, $raw_label); 300 $ce_panel->Add(1, 6, $raw_entry, $flage); 301 $ce_panel->Add(0, 7, $tno_label); 302 $ce_panel->Add(1, 7, $tno_entry, $flage); 320 $flage = NEWT_ANCHOR_RIGHT; 321 $ce_panel->Add(0, 5, $tno_label,$flage); 322 $flage = NEWT_ANCHOR_LEFT; 323 $ce_panel->Add(1, 5, $tno_entry, $flage); 324 #$ce_panel->Add(0, 5, $data_label); 325 #$ce_panel->Add(1, 5, $data_entry, $flage); 326 #$ce_panel->Add(0, 6, $raw_label); 327 #$ce_panel->Add(1, 6, $raw_entry, $flage); 303 328 #$ce_panel->Add(0, 5, $info_label); 304 329 #$ce_panel->Add(1, 5, $info_entry, $flage); … … 327 352 $n++; 328 353 } 329 330 $ce_panel->Add(0, 8+$n, $send_button); 331 $ce_panel->Add(1, 8+$n, $reload_button); 332 $ce_panel->Add(2, 8+$n, $quit_button); 354 $ce_panel->Add(0, 8+$n, $empty_label); 355 356 $ce_panel->Add(0, 8+$n+1, $send_button); 357 $ce_panel->Add(1, 8+$n+1, $reload_button); 358 $ce_panel->Add(2, 8+$n+1, $quit_button); 333 359 334 360 Newt::Cls();
Note:
See TracChangeset
for help on using the changeset viewer.