Changeset 29581 in osm for applications/editors/josm/plugins/geochat
- Timestamp:
- 2013-05-10T09:40:24+02:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/geochat/src/geochat
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/geochat/src/geochat/GeoChatPanel.java
r29576 r29581 68 68 connection.addListener(this); 69 69 connection.checkLogin(); 70 updateTitleAlarm(); 70 71 } 71 72 … … 77 78 } 78 79 }; 79 String userName = JosmUserIdentityManager.getInstance().getUserName();80 String userName = Main.pref.get("geochat.username", JosmUserIdentityManager.getInstance().getUserName()); 80 81 if( userName == null ) 81 82 userName = ""; … … 171 172 */ 172 173 protected void updateTitleAlarm() { 173 int alarmLevel = c hatPanes.getNotifyLevel();174 int alarmLevel = connection.isLoggedIn() ? chatPanes.getNotifyLevel() : 0; 174 175 if( !isDialogInCollapsedView() && alarmLevel > 1 ) 175 176 alarmLevel = 1; 176 String title = users.isEmpty() ? tr("GeoChat") : 177 trn("GeoChat ({0} user)", "GeoChat ({0} users)", users.size(), users.size()); 177 178 String comment; 179 if( connection.isLoggedIn() ) { 180 comment = trn("{0} user", "{0} users", users.size() + 1, users.size() + 1); 181 } else { 182 comment = tr("not logged in"); 183 } 184 185 String title = tr("GeoChat"); 186 if( comment != null ) 187 title = title + " (" + comment + ")"; 178 188 String alarm = alarmLevel <= 0 ? "" : alarmLevel == 1 ? "* " : "!!! "; 179 189 setTitle(alarm + title); … … 193 203 194 204 public void loggedIn( String userName ) { 205 Main.pref.put("geochat.username", userName); 195 206 if( gcPanel.getComponentCount() == 1 ) { 196 207 gcPanel.remove(0); … … 198 209 gcPanel.add(input, BorderLayout.SOUTH); 199 210 } 211 updateTitleAlarm(); 200 212 } 201 213 … … 214 226 } 215 227 } 228 updateTitleAlarm(); 216 229 } 217 230 -
applications/editors/josm/plugins/geochat/src/geochat/GeoChatPopupAdapter.java
r29576 r29581 116 116 if( !wasAdded ) 117 117 Main.map.mapView.removeTemporaryLayer(panel); 118 panel.userLayerActive = wasAdded; 118 119 putValue(SELECTED_KEY, Boolean.valueOf(panel.userLayerActive)); 119 120 Main.map.mapView.repaint();
Note:
See TracChangeset
for help on using the changeset viewer.