Mercurial > pidgin
view mkinstalldirs @ 9584:fe35f55ee984
[gaim-migrate @ 10427]
" When joining a jabber conference many jabber servers
send a recap of the last 20 or so messages. If you
have sounds enabled, this will result in either 20
sounds in row, or worse if mixing is available, a
horrible mix of 20 overlapping sounds. These recap
messages can be identifed be the presence of the
"jabber:x:delay". This patch identifies delayed
messages, passes that information through flags from
the prpl to the core, and then on to the gui. Detailed
changes:
Add GAIM_MESSAGE_DELAYED to GaimMessageFlags to
indicate a delayed message.
Change gtkconv.c to not play sounds when either
GAIM_MESSAGE_DELAYED or GAIM_MESSAGE_SYSTEM are set.
Add GaimConvChatFlags, parallel to GaimConvImFlags, to
pass flags from protocols to core. Currently contains
two flags:
GAIM_CONV_CHAT_WHISPER
GAIM_CONV_CHAT_DELAYED
Change fourth arg of serv_got_chat_in() from "int
whisper" to "GaimConvChatFlags chatflags".
Change jabber prpl to set delayed flag when the
"jabber:x:delay" element is present. Change toc
protocol since it uses the whisper flag." --Nathan Fredrickson
Date: 2004-07-24 00:49
Sender: marv_sfAccepting Donations
Logged In: YES
user_id=790708
I'm not sure I like naming the flags "DELAYED". I mean
that's okay inside jabber since that's what the jabber
protocol refers to it as, but for the the GAIM_*_DELAYED
flags, I think they should be named something else.
I thought about NOSOUND, but I decided that was wrong,
because the flag should say what kind of message it is, not
what to do with it, that's up to the UI to decide.
What's up with not playing sounds on GAIM_MESSAGE_SYSTEM?
This sounds unrelated to this. Are there times when we want
to play sounds on system messages?
Date: 2004-07-24 09:13
Sender: noif
Logged In: YES
user_id=365548
I purposely did not use a name that implied what the UI
should do with the flag. The only characteristic that makes
these messages unique is that they've been stored in the
server for some period of time and are not current. I'm
open to a better flag name than "DELAYED"... I thought about
"RECAP", but that seemed less generalized than "DELAYED".
As for not playing sounds on GAIM_MESSAGE_SYSTEM, that can
be removed if it's controversial. I think I slipped that
in since the setting of the topic was still playing a sound
every time you joined a jabber conference.
I think we can change the flag name ourselves if something else is better.
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sat, 24 Jul 2004 15:18:32 +0000 |
parents | a0b7b72e278d |
children |
line wrap: on
line source
#! /bin/sh # mkinstalldirs --- make directory hierarchy scriptversion=2004-02-15.20 # Original author: Noah Friedman <friedman@prep.ai.mit.edu> # Created: 1993-05-16 # Public domain. # # This file is maintained in Automake, please report # bugs to <bug-automake@gnu.org> or send patches to # <automake-patches@gnu.org>. errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ... Create each directory DIR (with mode MODE, if specified), including all leading file name components. Report bugs to <bug-automake@gnu.org>." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" exit 0 ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --version) echo "$0 $scriptversion" exit 0 ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac # Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and # mkdir -p a/c at the same time, both will detect that a is missing, # one will create a, then the other will try to create a and die with # a "File exists" error. This is a problem when calling mkinstalldirs # from a parallel make. We use --version in the probe to restrict # ourselves to GNU mkdir, which is thread-safe. case $dirmode in '') if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. test -d ./-p && rmdir ./-p test -d ./--version && rmdir ./--version fi ;; *) if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 && test ! -d ./--version; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" else # Clean up after NextStep and OpenStep mkdir. for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: