Index: /applications/editors/josm/plugins/geochat/geochat.svg
===================================================================
--- /applications/editors/josm/plugins/geochat/geochat.svg	(revision 29572)
+++ /applications/editors/josm/plugins/geochat/geochat.svg	(revision 29572)
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="24"
+   height="24"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.3.1 r9886"
+   inkscape:export-filename="/home/zverik/progr/josm/plugins/geochat/images/dialogs/geochat.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90"
+   sodipodi:docname="Новый документ 1">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="15.839192"
+     inkscape:cx="9.2191366"
+     inkscape:cy="12.903461"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1278"
+     inkscape:window-height="779"
+     inkscape:window-x="0"
+     inkscape:window-y="19"
+     inkscape:window-maximized="0" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-1028.3622)">
+    <path
+       style="fill:#f2f2f2;fill-opacity:1;stroke:#000000;stroke-width:0.96899998;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none"
+       d="m 5.4953109,1031.0423 13.1998451,0 c 2.3497,0 4.241336,1.8916 4.241336,4.2413 l 0,7.1533 c 0,2.3497 -1.891636,4.2414 -4.241336,4.2414 l -7.583478,0 -4.8613591,4.5457 1.0732871,-4.5457 -1.8282951,0 c -2.3496998,0 -4.2413354,-1.8917 -4.2413354,-4.2414 l 0,-7.1533 c 0,-2.3497 1.8916356,-4.2413 4.2413354,-4.2413 z"
+       id="rect2985"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="ssssscccssss" />
+    <text
+       xml:space="preserve"
+       style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       x="6.6922607"
+       y="11.246824"
+       id="text3756"
+       sodipodi:linespacing="125%"
+       transform="translate(0,1028.3622)"><tspan
+         sodipodi:role="line"
+         id="tspan3758"
+         x="6.6922607"
+         y="11.246824" /></text>
+    <text
+       xml:space="preserve"
+       style="font-size:10px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Comic Sans MS;-inkscape-font-specification:Comic Sans MS"
+       x="12.078979"
+       y="1043.334"
+       id="text3760"
+       sodipodi:linespacing="125%"><tspan
+         sodipodi:role="line"
+         id="tspan3762"
+         x="12.078979"
+         y="1043.334"
+         style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;text-anchor:middle;fill:#000042;fill-opacity:1;font-family:Droid Sans;-inkscape-font-specification:Droid Sans Bold">Hi!</tspan></text>
+  </g>
+</svg>
Index: /applications/editors/josm/plugins/geochat/src/geochat/GeoChatPanel.java
===================================================================
--- /applications/editors/josm/plugins/geochat/src/geochat/GeoChatPanel.java	(revision 29571)
+++ /applications/editors/josm/plugins/geochat/src/geochat/GeoChatPanel.java	(revision 29572)
@@ -152,34 +152,20 @@
     /* ================== Notifications in the title ======================= */
 
-    private String cachedTitle = null;
-    private int cachedAlarm = 0;
-
-    @Override
-    public void setTitle( String title ) {
-        setTitle(title, -1);
-    }
-
-    private void setTitle( String title, int alarmLevel ) {
-        boolean changed = false;
-        if( title != null && (cachedTitle == null || !cachedTitle.equals(title)) ) {
-            cachedTitle = title;
-            changed = true;
-        }
-        if( alarmLevel >= 0 && cachedAlarm != alarmLevel ) {
-            cachedAlarm = alarmLevel;
-            changed = true;
-        }
-        if( changed ) {
-            String alarm = cachedAlarm <= 0 ? "" : cachedAlarm == 1 ? "* " : "!!! ";
-            super.setTitle(alarm + cachedTitle);
-            // todo: title becomes cut off
-        }
-    }
-
+    /**
+     * Display number of users and notifications in the panel title.
+     */
     protected void updateTitleAlarm() {
-        int notifyLevel = chatPanes.getNotifyLevel();
-        setTitle(null, isDialogInCollapsedView() ? notifyLevel : Math.min(1, notifyLevel));
-    }
-
+        int alarmLevel = chatPanes.getNotifyLevel();
+        if( !isDialogInCollapsedView() && alarmLevel > 1 )
+            alarmLevel = 1;
+        String name = users.isEmpty() ? tr("GeoChat") :
+                trn("GeoChat ({0} user)", "GeoChat ({0} users)", users.size(), users.size());
+        String alarm = alarmLevel <= 0 ? "" : alarmLevel == 1 ? "* " : "!!! ";
+        setTitle(alarm + name);
+    }
+
+    /**
+     * Track panel collapse events.
+     */
     @Override
     protected void setIsCollapsed( boolean val ) {
@@ -238,6 +224,6 @@
                 chatPanes.addLineToPublic(tr("User {0} is mapping nearby", uname));
         }
-        setTitle(trn("GeoChat ({0} user)", "GeoChat ({0} users)", newUsers.size(), newUsers.size()));
         this.users = newUsers;
+        updateTitleAlarm();
         if( userLayerActive && Main.map.mapView != null )
             Main.map.mapView.repaint();
