~ubuntu-branches/ubuntu/natty/jabref/natty

« back to all changes in this revision

Viewing changes to src/java/net/sf/jabref/DuplicateResolverDialog.java

  • Committer: Bazaar Package Importer
  • Author(s): gregor herrmann
  • Date: 2007-11-16 18:38:18 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20071116183818-20x934jdsju14618
Tags: 2.3-2
* Add /usr/lib/jvm/java-7-icedtea to wrapper script. Doesn't work on
  Debian yet but helps Ubuntu users (TODO: add dependency on
  icedtea-java7-jre (not yet in Debian)).
* Reformat wrapper script.
* debian/rules: re-arrange targets and their dependencies.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
        KEEP_BOTH = 0,
27
27
        KEEP_UPPER = 1,
28
28
        KEEP_LOWER = 2,
 
29
        AUTOREMOVE_EXACT = 3,
29
30
        BREAK      = 5,  // close
30
31
        IMPORT_AND_DELETE_OLD = 1,
31
32
        IMPORT_AND_KEEP_OLD = 0,
32
33
        DO_NOT_IMPORT = 2,
33
34
        DUPLICATE_SEARCH = 1,
34
35
        IMPORT_CHECK = 2,
35
 
    INSPECTION = 3;
 
36
        INSPECTION = 3,
 
37
        DUPLICATE_SEARCH_WITH_EXACT = 4;
36
38
 
37
39
    final Dimension DIM = new Dimension(650, 600);
38
40
 
42
44
    GridBagLayout gbl = new GridBagLayout();
43
45
    GridBagConstraints con = new GridBagConstraints();
44
46
    JButton first, second, both,
45
 
        cancel = new JButton(Globals.lang("Cancel"));
 
47
        cancel = new JButton(Globals.lang("Cancel")),
 
48
        removeExact = null;
46
49
    JPanel options = new JPanel(),
47
50
        main = new JPanel(),
48
51
        source = new JPanel();
74
77
              second = new JButton(Globals.lang("Remove entry from import"));
75
78
              both = new JButton(Globals.lang("Keep both"));
76
79
              break;
 
80
          case DUPLICATE_SEARCH_WITH_EXACT:
 
81
              first = new JButton(Globals.lang("Keep upper"));
 
82
              second = new JButton(Globals.lang("Keep lower"));
 
83
              both = new JButton(Globals.lang("Keep both"));
 
84
              removeExact = new JButton(Globals.lang("Automatically remove exact duplicates"));
 
85
              break;
77
86
          default:
78
87
              first = new JButton(Globals.lang("Import and remove old entry"));
79
88
                  second = new JButton(Globals.lang("Do not import entry"));
129
138
    source.add(sp);
130
139
    tabbed.add(Globals.lang("Short form"), main);
131
140
    tabbed.add(Globals.lang("Complete record"), source);
 
141
    if (removeExact != null)
 
142
        options.add(removeExact);
132
143
    options.add(first);
133
144
    options.add(second);
134
145
    options.add(both);
161
172
      }
162
173
    });
163
174
 
 
175
    if (removeExact != null)
 
176
        removeExact.addActionListener(new ActionListener() {
 
177
            public void actionPerformed(ActionEvent e) {
 
178
                status = AUTOREMOVE_EXACT;
 
179
                block = false;
 
180
                dispose();
 
181
            }
 
182
        });
 
183
 
164
184
    cancel.addActionListener(new ActionListener() {
165
185
      public void actionPerformed(ActionEvent e) {
166
186
        status = BREAK;