diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/cfgfiles.c | 2 | ||||
-rw-r--r-- | src/common/ctcp.c | 2 | ||||
-rw-r--r-- | src/common/outbound.c | 2 | ||||
-rw-r--r-- | src/common/text.c | 10 | ||||
-rw-r--r-- | src/common/text.h | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 4b8a4c8d..712f2bfa 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -843,7 +843,7 @@ load_config (void) g_free (buf); buf = g_build_filename (get_xdir (), "sounds", "beep.wav", NULL); -#ifdef WIN32 +#ifdef WIN32 /* keep this in sync with fe-gtk.c! */ beepsrc = g_file_new_for_path (HEXCHATSHAREDIR G_DIR_SEPARATOR_S "share" G_DIR_SEPARATOR_S "beep.wav"); #else beepsrc = g_file_new_for_path (HEXCHATSHAREDIR G_DIR_SEPARATOR_S "hexchat" G_DIR_SEPARATOR_S "beep.wav"); diff --git a/src/common/ctcp.c b/src/common/ctcp.c index ebfb604d..487003a8 100644 --- a/src/common/ctcp.c +++ b/src/common/ctcp.c @@ -175,7 +175,7 @@ ctcp_handle (session *sess, char *to, char *nick, char *ip, #else if (strchr (word[5], '/') == NULL) #endif - sound_play (word[5], TRUE); + sound_play (word[5], TRUE, FALSE); return; } } diff --git a/src/common/outbound.c b/src/common/outbound.c index d6ce1488..00ba4a86 100644 --- a/src/common/outbound.c +++ b/src/common/outbound.c @@ -3161,7 +3161,7 @@ cmd_splay (struct session *sess, char *tbuf, char *word[], char *word_eol[]) { if (*word[2]) { - sound_play (word[2], FALSE); + sound_play (word[2], FALSE, FALSE); return TRUE; } diff --git a/src/common/text.c b/src/common/text.c index 946ac542..3a61eecc 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -2218,7 +2218,7 @@ sound_find_command (void) } void -sound_play (const char *file, gboolean quiet) +sound_play (const char *file, gboolean quiet, gboolean hexchat_beep) { char *buf; char *wavfile; @@ -2233,10 +2233,10 @@ sound_play (const char *file, gboolean quiet) return; #ifdef WIN32 - /* check for fullpath */ - if (file[0] == '\\' || (((file[0] >= 'A' && file[0] <= 'Z') || (file[0] >= 'a' && file[0] <= 'z')) && file[1] == ':')) + /* check for fullpath; also use full path if hexchat_beep is TRUE, which should *only* happen when invoked by fe_beep() */ + if (hexchat_beep || file[0] == '\\' || (((file[0] >= 'A' && file[0] <= 'Z') || (file[0] >= 'a' && file[0] <= 'z')) && file[1] == ':')) #else - if (file[0] == '/') + if (hexchat_beep || file[0] == '/') #endif { wavfile = g_strdup (file); @@ -2308,7 +2308,7 @@ void sound_play_event (int i) { if (sound_files[i]) - sound_play (sound_files[i], FALSE); + sound_play (sound_files[i], FALSE, FALSE); } static void diff --git a/src/common/text.h b/src/common/text.h index 52cc8ea9..4d7bbb38 100644 --- a/src/common/text.h +++ b/src/common/text.h @@ -53,7 +53,7 @@ int get_stamp_str (char *fmt, time_t tim, char **ret); void format_event (session *sess, int index, char **args, char *o, int sizeofo, unsigned int stripcolor_args); char *text_find_format_string (char *name); -void sound_play (const char *file, gboolean quiet); +void sound_play (const char *file, gboolean quiet, gboolean hexchat_beep); void sound_play_event (int i); void sound_beep (session *); void sound_load (); |