Seed blinklight with "sender" parameter
authorJoachim Breitner <mail@joachim-breitner.de>
Sat, 30 Jan 2010 21:34:47 +0000 (21:34 +0000)
committerJoachim Breitner <mail@joachim-breitner.de>
Sat, 30 Jan 2010 21:34:47 +0000 (21:34 +0000)
src/blink.c
src/blink.h
src/pidgin-blinklight.c

index f33f4e3..fed791f 100644 (file)
@@ -120,7 +120,7 @@ blinklight_blink(blinkstate *bstate) {
 
 // From http://en.wikipedia.org/wiki/Jenkins_hash_function
 static guint32
-jenkins_one_at_a_time_hash(char *key)
+jenkins_one_at_a_time_hash(const gchar *key)
 {
     guint32 hash = 0;
  
@@ -137,7 +137,7 @@ jenkins_one_at_a_time_hash(char *key)
 
 
 void
-blinklight_startblink(char *seed) {
+blinklight_startblink(const gchar *seed) {
        int length = 4;
        blinkstate *bstate = malloc(sizeof(blinkstate));
        blinky *seq ;
index 2c474d7..f694f4b 100644 (file)
@@ -23,7 +23,7 @@
 #include <glib.h>
 
 void
-blinklight_startblink(char *);
+blinklight_startblink(const gchar *);
 
 guint
 blinklight_timeout_add (guint, GSourceFunc, gpointer);
index 4b3ca9a..72eb79b 100644 (file)
@@ -62,12 +62,12 @@ gt_blink(PurpleAccount *account, const gchar *sender,
        if (purple_prefs_get_bool("/plugins/core/pidgin-blinklight/focus"))
        {
                // Blink in any case
-               blinklight_startblink(NULL);
+               blinklight_startblink(sender);
        } else {
                // Only blink when not having focus
                PurpleConversation *conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, sender, account);
                if (! purple_conversation_has_focus(conv)) 
-                       blinklight_startblink(NULL);
+                       blinklight_startblink(sender);
        }
 }