Changeset 4448


Ignore:
Timestamp:
2003-06-03T12:16:05+12:00 (21 years ago)
Author:
jmt12
Message:

2030100: Since the LockFileDialog has no parent during GLI startup, our magical not-really-modal ModalDialog doesn't work properly. The short-term solution was to revert this to a modal JDialog.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/gui/LockFileDialog.java

    r4427 r4448  
    1414import org.w3c.dom.*;
    1515
     16/** A lock file dialog is shown whenever GLI detects an existing lock on a collection it is trying to open. The user can look at the details provided with the dialog, and decide whether to 'steal' the lock or to cancel the loading. While I would have loved to make this one of the modal-but-not-really-modal dialog boxes, it turns out this doesn't work as there is theoretically no parent frame if this dialog is created during GLI startup. So instead I'll use a boring old JDialog and hope that nobody ever asks for a help item to be added to this dialog. */
    1617public class LockFileDialog
    17     extends ModalDialog {
     18    extends JDialog {
     19    // extends ModalDialog {
    1820
    1921    private int choice;
     
    125127
    126128    public int getChoice() {
    127     setVisible(true);
     129    show();
     130    ///ystem.err.println("Get choice... blocks here.");
     131    ///setVisible(true);
     132    ///ystem.err.println("Dispose recieved, return.");
    128133    return choice;
    129134    }
     
    154159        choice = NO_OPTION;
    155160        }
    156         self.setVisible(false);
     161        ///ystem.err.println("setVisible(false)");
     162        ///self.setVisible(false);
     163        ///ystem.err.println("dispose()");
    157164        self.dispose();
    158165    }
Note: See TracChangeset for help on using the changeset viewer.