Ignore:
Timestamp:
06/30/09 18:05:35 (15 years ago)
Author:
alexandrecorreia
Message:

Ticket #474 - Arquivos modificados para a tradução do Applet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/jabberit_messenger/java_source/src/nu/fw/jeti/backend/Start.java

    r1014 r1064  
    5656{ 
    5757        public static final String VERSION = "0.7.7"; 
    58         //public final static String OS2 = "/2"; 
    5958        public final static String OS2 = ""; 
    6059        public static String BUILD_DATE; 
     
    8988                        ex.printStackTrace(); 
    9089                } 
    91                 if(!applet && System.getProperty("jnlpx.home")!=null)webstart = true; 
    92                  
    93                 if (urlString == null) urlString = getPath(); 
     90                 
     91                if ( urlString == null)  
     92                        urlString = getPath(); 
    9493                 
    9594                if (System.getProperty("file.separator").equals("/")) 
     
    9796                        pluginPath = urlString.substring(5); 
    9897                } 
    99                 else pluginPath = urlString.substring(6); 
     98                else  
     99                        pluginPath = urlString.substring(6); 
     100                 
    100101                pluginPath = pluginPath.replace('/', File.separatorChar); 
    101102                 
    102                  
    103                  
    104                 if(programURL==null) 
    105                 { 
    106                         try 
    107                         { 
    108                                 programURL = new URL(urlString); 
    109                                  
    110                                 if(webstart || (path!=null&&path.equals("home"))) 
    111                                 { 
    112                                         path = System.getProperty("user.home")+ File.separatorChar 
    113                                                                                                 + ".jeti" +File.separatorChar; 
    114                                         File dir =new File(path); 
    115                                         if(!dir.exists()) 
    116                                         { 
    117                                                 if(!dir.mkdir()) 
    118                                                 { 
    119                                                         JOptionPane.showMessageDialog(null, "Directory " + dir + " could not be created, Jeti will close"); 
    120                                                         System.exit(1); 
    121                                                 } 
    122                                         } 
    123                                         dataURL = new URL("file:/"+path); 
    124                                 } 
    125                                 else if(path!=null) 
    126                                 { 
    127                                         File dir =new File(path); 
    128                                         if(!dir.exists()) 
    129                                         { 
    130                                                 if(!dir.mkdir()) 
    131                                                 { 
    132                                                         JOptionPane.showMessageDialog(null, "Directory " + dir + " could not be created, Jeti will close"); 
    133                                                         System.exit(1); 
    134                                                 } 
    135                                         } 
    136                                         dataURL = new URL("file:/"+path); 
    137                                 } 
    138                                 else 
    139                                 { 
    140                                         dataURL = programURL; 
    141                                         path = pluginPath; 
    142                                 } 
    143                                 System.out.println(programURL); 
    144                                 System.out.println(dataURL); 
    145                         } 
    146                         catch (MalformedURLException ex) 
    147                         { 
    148                                 ex.printStackTrace(); 
    149                         } 
    150                 } 
    151                 else  
    152                 { 
    153                         //if programurl null applet or network so use program path as data path  
    154                         dataURL = programURL; 
    155                         path = pluginPath; 
    156                 } 
    157                                                  
     103                /** 
     104                 * Se o programurl for null, applet ou network tb usa program path como data path 
     105                 */ 
     106                 
     107                dataURL = programURL; 
     108                path = pluginPath; 
     109 
    158110                try 
    159111                { 
     
    162114                        BUILD_DATE = p.getProperty("buildDate"); 
    163115                        BUILD_NUM = p.getProperty("buildNum"); 
    164                 } catch (Exception e) 
     116                }  
     117                catch (Exception e) 
    165118                { 
    166119                        System.out.println("Can't find the version.properties file"); 
     
    170123                backend = new Backend(this); 
    171124                new Preferences(backend, parser); 
    172                 I18N.init(); 
    173                 //Preferences.initMessages(); 
    174125                JFrame.setDefaultLookAndFeelDecorated(Preferences.getBoolean("jeti","javadecorations",false)); 
    175126                 
    176                 if(Preferences.getBoolean("jeti", "nativeLnF", false)) 
    177                 { 
    178                         try 
    179                         { 
    180                                 UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); 
    181                         } catch (ClassNotFoundException e) 
    182                         { 
    183                                 e.printStackTrace(); 
    184                         } catch (InstantiationException e) 
    185                         { 
    186                                 e.printStackTrace(); 
    187                         } catch (IllegalAccessException e) 
    188                         { 
    189                                 e.printStackTrace(); 
    190                         } catch (UnsupportedLookAndFeelException e) 
    191                         { 
    192                                 e.printStackTrace(); 
    193                         } 
    194                 } 
    195127                //parse plugins? make better or make comments 
    196128                new StatusIcons(parser); 
Note: See TracChangeset for help on using the changeset viewer.