Changeset 10750 for extensions/jiwigo/trunk
- Timestamp:
- May 3, 2011, 8:27:59 PM (14 years ago)
- Location:
- extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/DialogPrivacyLevel.java
r8829 r10750 71 71 private JLabel labelChoice; 72 72 73 private HashMap<Integer, Integer> mapLevels = new HashMap<Integer, Integer>(); 74 73 75 /** 74 76 * Constructor … … 77 79 super(MainFrame.getInstance()); 78 80 setModal(true); 81 mapLevels.put(0, 0); 82 mapLevels.put(1, 1); 83 mapLevels.put(2, 2); 84 mapLevels.put(3, 4); 85 mapLevels.put(4, 8); 79 86 checkBoxRemember = new JCheckBox(Messages.getMessage("dialogPrivacy_remember")); 80 87 labelChoice = new JLabel(Messages.getMessage("dialogPrivacy_choosePrivacy")); … … 101 108 public void actionPerformed(ActionEvent arg0) { 102 109 if (arg0.getSource().equals(buttonOk)) { 103 ImagesManagement.getInstance().setPrivacyLevel(comboPrivacyLevel.getSelectedIndex() + 1); 110 System.out.println(mapLevels.get(comboPrivacyLevel.getSelectedIndex())); 111 ImagesManagement.getInstance().setPrivacyLevel(mapLevels.get(comboPrivacyLevel.getSelectedIndex())); 104 112 if (checkBoxRemember.isSelected()) { 105 113 ImagesManagement.getInstance().setRememberPrivacyLevel(true); … … 116 124 */ 117 125 class privacyLevelModel extends AbstractListModel implements ComboBoxModel { 118 HashMap<Integer, String> mapLevels = new HashMap<Integer, String>();119 126 120 127 String[] privacies = new String[5]; … … 123 130 124 131 public privacyLevelModel() { 125 HashMap<Integer, String> mapLevels = new HashMap<Integer, String>(); 126 mapLevels.put(0, "dialogPrivacy_none"); 127 mapLevels.put(1, "dialogPrivacy_contacts"); 128 mapLevels.put(2, "dialogPrivacy_friends"); 129 mapLevels.put(3, "dialogPrivacy_family"); 130 mapLevels.put(4, "dialogPrivacy_admin"); 132 131 133 privacies[0] = Messages.getMessage("dialogPrivacy_none"); 132 134 privacies[1] = Messages.getMessage("dialogPrivacy_contacts") + ", " -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/mainframe/ThumbnailCategoryPanel.java
r10748 r10750 245 245 if (PreferencesManagement.getValue(PreferencesEnum.SENDING_METHOD.getLabel()).equals("0")) { 246 246 try { 247 SpringUtils.getImageService().addSimple(files[i], category.getIdentifier(), files[i].getName()); 247 SpringUtils.getImageService().addSimple(files[i], category.getIdentifier(), files[i].getName(), 248 imagesManagement.getPrivacyLevel()); 248 249 } catch (JiwigoException e) { 249 250 LOG.error(Tools.getStackTrace(e)); -
extensions/jiwigo/trunk/src/main/java/fr/mael/jiwigo/ui/search/DialogChooseCategory.java
r10748 r10750 168 168 if (PreferencesManagement.getValue(PreferencesEnum.SENDING_METHOD.getLabel()).equals("0")) { 169 169 try { 170 SpringUtils.getImageService().addSimple(file, category.getIdentifier(), file.getName()); 170 SpringUtils.getImageService().addSimple(file, category.getIdentifier(), file.getName(), 171 ImagesManagement.getInstance().getPrivacyLevel()); 171 172 } catch (JiwigoException e) { 172 173 LOG.error(Tools.getStackTrace(e));
Note: See TracChangeset
for help on using the changeset viewer.