Mercurial > pidgin
diff src/pounce.h @ 12694:ebed1bbedb04
[gaim-migrate @ 15037]
SF Patch #1386297 from Lucio Maciel
"Add per pounce options, to pounce only when away/not
available.
Add pounce when receive a new im message
(received-im-msg signal)
Fix (pounce != GAIM_POUNCE_NONE) in
gaim_pounce_set_events()"
I changed this patch so that you can't create a pounce that sends an IM in response to receiving an IM. Auto-reply is messy.
I also cleaned up some little things that were bothering me in the pounce dialog.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 03 Jan 2006 11:42:51 +0000 |
parents | dc4475bf718f |
children | a539caf502b0 |
line wrap: on
line diff
--- a/src/pounce.h Tue Jan 03 09:05:14 2006 +0000 +++ b/src/pounce.h Tue Jan 03 11:42:51 2006 +0000 @@ -43,10 +43,17 @@ GAIM_POUNCE_IDLE = 0x10, /**< The buddy became idle. */ GAIM_POUNCE_IDLE_RETURN = 0x20, /**< The buddy is no longer idle. */ GAIM_POUNCE_TYPING = 0x40, /**< The buddy started typing. */ - GAIM_POUNCE_TYPING_STOPPED = 0x80 /**< The buddy stopped typing. */ + GAIM_POUNCE_TYPING_STOPPED = 0x80, /**< The buddy stopped typing. */ + GAIM_POUNCE_MESSAGE_RECEIVED = 0x100 /**< The buddy sent a message */ } GaimPounceEvent; +typedef enum +{ + GAIM_POUNCE_OPTION_NONE = 0x00, /**< No Option */ + GAIM_POUNCE_OPTION_AWAY = 0x01 /**< Pounce only when away */ +} GaimPounceOption; + /** A pounce callback. */ typedef void (*GaimPounceCb)(GaimPounce *, GaimPounceEvent, void *); @@ -63,6 +70,7 @@ char *ui_type; /**< The type of UI. */ GaimPounceEvent events; /**< The event(s) to pounce on. */ + GaimPounceOption options; /**< The pounce options */ GaimAccount *pouncer; /**< The user who is pouncing. */ char *pouncee; /**< The buddy to pounce on. */ @@ -94,7 +102,8 @@ * @return The new buddy pounce structure. */ GaimPounce *gaim_pounce_new(const char *ui_type, GaimAccount *pouncer, - const char *pouncee, GaimPounceEvent event); + const char *pouncee, GaimPounceEvent event, + GaimPounceOption option); /** * Destroys a buddy pounce. @@ -119,6 +128,14 @@ void gaim_pounce_set_events(GaimPounce *pounce, GaimPounceEvent events); /** + * Sets the options for a pounce. + * + * @param pounce The buddy pounce. + * @param options The options for the pounce. + */ +void gaim_pounce_set_options(GaimPounce *pounce, GaimPounceOption options); + +/** * Sets the account that will do the pouncing. * * @param pounce The buddy pounce. @@ -191,6 +208,15 @@ GaimPounceEvent gaim_pounce_get_events(const GaimPounce *pounce); /** + * Returns the options for a pounce. + * + * @param pounce The buddy pounce. + * + * @return The options for the pounce. + */ +GaimPounceOption gaim_pounce_get_options(const GaimPounce *pounce); + +/** * Returns the account that will do the pouncing. * * @param pounce The buddy pounce.