Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganized preferences storage in preparation for preferences dialog
- Loading branch information
Pierre-Luc Paour
committed
Aug 13, 2002
1 parent
b29cf8e
commit a8453f1
Showing
4 changed files
with
346 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,92 @@ | ||
/* | ||
* Gallery Remote - a File Upload Utility for Gallery | ||
* Gallery Remote - a File Upload Utility for Gallery | ||
* | ||
* Gallery - a web based photo album viewer and editor | ||
* Copyright (C) 2000-2001 Bharat Mediratta | ||
* Gallery - a web based photo album viewer and editor | ||
* Copyright (C) 2000-2001 Bharat Mediratta | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or (at | ||
* your option) any later version. | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation; either version 2 of the License, or (at | ||
* your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* General Public License for more details. | ||
* This program is distributed in the hope that it will be useful, but | ||
* WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program; if not, write to the Free Software | ||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
*/ | ||
|
||
package com.gallery.GalleryRemote; | ||
import javax.swing.*; | ||
import java.io.*; | ||
import javax.swing.*; | ||
|
||
public class GalleryRemote { | ||
public GalleryRemote() { | ||
try { | ||
/** | ||
* Main class and entry point of Gallery Remote | ||
* | ||
*@author paour | ||
*@created 11 août 2002 | ||
*/ | ||
public class GalleryRemote | ||
{ | ||
private static GalleryRemote singleton = null; | ||
|
||
public MainFrame mainFrame = null; | ||
public PropertiesFile properties = null; | ||
public PropertiesFile defaults = null; | ||
|
||
private GalleryRemote() {} | ||
|
||
private void run() | ||
{ | ||
try | ||
{ | ||
// For native Look and Feel, uncomment the following code. | ||
/// * | ||
try { | ||
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); | ||
} | ||
catch (Exception e) { | ||
try | ||
{ | ||
UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() ); | ||
} | ||
catch ( Exception e ) | ||
{ | ||
} | ||
//* / | ||
MainFrame frame = new MainFrame(); | ||
frame.initComponents(); | ||
frame.setVisible(true); | ||
|
||
defaults = new PropertiesFile("defaults"); | ||
properties = new PropertiesFile(defaults, "remote"); | ||
|
||
mainFrame = new MainFrame(); | ||
mainFrame.initComponents(); | ||
mainFrame.setVisible( true ); | ||
} | ||
catch (Exception e) { | ||
catch ( Exception e ) | ||
{ | ||
e.printStackTrace(); | ||
} | ||
} | ||
|
||
public static GalleryRemote getInstance() | ||
{ | ||
return singleton; | ||
} | ||
|
||
// Main entry point | ||
static public void main(String[] args) { | ||
new GalleryRemote(); | ||
public static void main( String[] args ) | ||
{ | ||
singleton = new GalleryRemote(); | ||
|
||
singleton.run(); | ||
|
||
//-- check for updated version of the app, using InstallAnywhere's -- | ||
//-- PowerUpdate service --- | ||
try{ | ||
Runtime.getRuntime().exec("update -whisper"); | ||
} catch (IOException e) { | ||
try | ||
{ | ||
Runtime.getRuntime().exec( "update -whisper" ); | ||
} | ||
catch ( IOException e ) | ||
{ | ||
} | ||
} | ||
|
||
} | ||
|
Oops, something went wrong.