<commit_before>/**
 * $Revision: 22540 $
 * $Date: 2005-10-10 08:44:25 -0700 (Mon, 10 Oct 2005) $
 *
 * Copyright (C) 1999-2005 Jive Software. All rights reserved.
 *
 * This software is the proprietary information of Jive Software.
 * Use is subject to license terms.
 */

package com.jivesoftware.spark.plugin.apple;


import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.spark.SparkManager;
import org.jivesoftware.spark.ui.ChatRoom;
import org.jivesoftware.spark.ui.MessageListener;

/**
 * When a message is received and the user does not have presence
 * the dock will bounce.
 *
 * @author <NAME>
 */
public class DockMessageListener implements MessageListener {


    public void messageReceived(ChatRoom room, Message message) {

        if (!SparkManager.getMainWindow().isFocused()) {
            AppleUtils.bounceDockIcon(true);
        }

    }

    public void messageSent(ChatRoom room, Message message) {
    }
}
<commit_msg>Changed to only bounce the dock item once.<commit_after>/**
 * $Revision: 22540 $
 * $Date: 2005-10-10 08:44:25 -0700 (Mon, 10 Oct 2005) $
 *
 * Copyright (C) 1999-2005 Jive Software. All rights reserved.
 *
 * This software is the proprietary information of Jive Software.
 * Use is subject to license terms.
 */

package com.jivesoftware.spark.plugin.apple;


import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.spark.SparkManager;
import org.jivesoftware.spark.ui.ChatRoom;
import org.jivesoftware.spark.ui.MessageListener;

/**
 * When a message is received and the user does not have presence
 * the dock will bounce.
 *
 * @author <NAME>
 */
public class DockMessageListener implements MessageListener {


    public void messageReceived(ChatRoom room, Message message) {

        if (!SparkManager.getMainWindow().isFocused()) {
            AppleUtils.bounceDockIcon(false);
        }

    }

    public void messageSent(ChatRoom room, Message message) {
    }
}

{'fraction_non_alphanumeric': 0.10328879753340185, 'fraction_numerical': 0.03802672147995889, 'mean_word_length': 3.602836879432624, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1467692', 'n_tokens_mistral': 665, 'n_tokens_neox': 577, 'n_words': 171}