[Btrwiz-commits] CVS: btrwiz/src FolderSelect.java,1.1,1.2 WelcomePage.java,1.1,1.2
Brought to you by:
howama
From: Mark H. <ho...@us...> - 2002-07-13 11:14:33
|
Update of /cvsroot/btrwiz/btrwiz/src In directory usw-pr-cvs1:/tmp/cvs-serv16638 Modified Files: FolderSelect.java WelcomePage.java Log Message: internationalisation Index: FolderSelect.java =================================================================== RCS file: /cvsroot/btrwiz/btrwiz/src/FolderSelect.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FolderSelect.java 12 Jul 2002 18:02:40 -0000 1.1 --- FolderSelect.java 13 Jul 2002 11:14:30 -0000 1.2 *************** *** 4,19 **** import gnu.gtk.*; import gnu.pango.*; class FolderSelect extends WizardPage{ ! private GtkVBox content; GtkEntry dirEntry; ! FolderSelect(WizardForm parent, String title){ super(parent, title, null); content = new GtkVBox(false, 0); ! GtkLabel headLbl = new GtkLabel("Please select the directory which contains the files to be searched. You will be able to filter files (so that not all files are searched) in the following screens."); headLbl.setLineWrap(true); headLbl.setJustify(GtkJustification.FILL); --- 4,22 ---- import gnu.gtk.*; import gnu.pango.*; + import java.util.ResourceBundle; class FolderSelect extends WizardPage{ ! private ResourceBundle messages; ! private GtkVBox content; GtkEntry dirEntry; ! FolderSelect(ResourceBundle rb, WizardForm parent, String title){ super(parent, title, null); + messages = rb; content = new GtkVBox(false, 0); ! GtkLabel headLbl = new GtkLabel(messages.getString("Head") ); headLbl.setLineWrap(true); headLbl.setJustify(GtkJustification.FILL); *************** *** 21,33 **** dirEntry = new GtkEntry(); ! dirEntry.setText( System.getProperty("user.dir") ); content.add(dirEntry); ! GtkButton selDir = new GtkButton("Select Directory"); selDir.signalConnect("clicked", "showSelectBox", this); content.add(selDir); ! setButtons(true, "Previous", true, "Next"); setContent(content); --- 24,36 ---- dirEntry = new GtkEntry(); ! dirEntry.setText( System.getProperty("user.dir") + System.getProperty("file.separator") ); content.add(dirEntry); ! GtkButton selDir = new GtkButton( messages.getString("SelDir") ); selDir.signalConnect("clicked", "showSelectBox", this); content.add(selDir); ! setButtons(true, messages.getString("Prev"), true, messages.getString("Next") ); setContent(content); *************** *** 35,45 **** GtkFileSelection selector; private void showSelectBox(){ ! selector = new GtkFileSelection("Select Diretory to scan"); selector.setFilename(dirEntry.getText()); selector.getOkButton().signalConnect("clicked", "setDir", this); selector.show(); } private void setDir(){ dirEntry.setText(selector.getFilename()); } } --- 38,55 ---- GtkFileSelection selector; private void showSelectBox(){ ! selector = new GtkFileSelection( messages.getString("SelDirTS") ); selector.setFilename(dirEntry.getText()); selector.getOkButton().signalConnect("clicked", "setDir", this); + selector.getCancelButton().signalConnect("clicked", "rmSelector", this); + selector.getFileList().setSensitive(false); + selector.getSelectionEntry().hide(); selector.show(); } private void setDir(){ dirEntry.setText(selector.getFilename()); + rmSelector(); + } + private void rmSelector(){ + selector.destroy(); } } Index: WelcomePage.java =================================================================== RCS file: /cvsroot/btrwiz/btrwiz/src/WelcomePage.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WelcomePage.java 12 Jul 2002 18:02:40 -0000 1.1 --- WelcomePage.java 13 Jul 2002 11:14:30 -0000 1.2 *************** *** 4,15 **** import gnu.gtk.*; import gnu.pango.*; class WelcomePage extends WizardPage{ private GtkVBox content; ! ! WelcomePage(WizardForm parent, String title){ super(parent, title, null); content = new GtkVBox(false, 0); --- 4,17 ---- import gnu.gtk.*; import gnu.pango.*; + import java.util.ResourceBundle; class WelcomePage extends WizardPage{ private GtkVBox content; ! private ResourceBundle messages; ! WelcomePage(ResourceBundle rb, WizardForm parent, String title){ super(parent, title, null); + messages = rb; content = new GtkVBox(false, 0); *************** *** 21,29 **** content.add(titleLbl); ! GtkLabel verLbl = new GtkLabel("Version "+BtrWiz.VERSION); verLbl.setJustify(GtkJustification.CENTER); content.add(verLbl); ! GtkLabel msgLbl = new GtkLabel("WARNING: THIS IS DEVELOPMENTAL SOFTWARE. DO NOT TRUST IT. \n\nThis is open source software, written in Java and using the Java-GNOME Gtk Bindings. If you know anything about java or Gtk programming and would like to help, please get in contact with us."); msgLbl.setLineWrap(true); msgLbl.setJustify(GtkJustification.FILL); --- 23,31 ---- content.add(titleLbl); ! GtkLabel verLbl = new GtkLabel( messages.getString("Version")+BtrWiz.VERSION); verLbl.setJustify(GtkJustification.CENTER); content.add(verLbl); ! GtkLabel msgLbl = new GtkLabel( messages.getString("DevelWarning") ); msgLbl.setLineWrap(true); msgLbl.setJustify(GtkJustification.FILL); *************** *** 34,38 **** content.add(wsLbl); ! GtkLabel gmsgLbl = new GtkLabel("The following pages will guide you through selecting files to search, choosing the text and starting the replacements.\nClick start to begin."); gmsgLbl.setLineWrap(true); gmsgLbl.setJustify(GtkJustification.FILL); --- 36,40 ---- content.add(wsLbl); ! GtkLabel gmsgLbl = new GtkLabel( messages.getString("StartInfo") ); gmsgLbl.setLineWrap(true); gmsgLbl.setJustify(GtkJustification.FILL); *************** *** 40,44 **** ! setButtons(false, null, true, "Start"); setContent(content); } --- 42,46 ---- ! setButtons(false, null, true, messages.getString("Start") ); setContent(content); } |