comparison src/gaimrc.c @ 5864:417b1001d2b1

[gaim-migrate @ 6295] Rewrote the pounce API again. Now it's even MORE core/UI-split, and will allow for loading/saving. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 14 Jun 2003 11:14:49 +0000
parents 96e5b32e75ad
children d048e5f2af27
comparison
equal deleted inserted replaced
5863:98ec3e394f59 5864:417b1001d2b1
381 * new types, but if you go and use an older gaim, these will be nuked. 381 * new types, but if you go and use an older gaim, these will be nuked.
382 * When we have a better prefs system, this can go away. 382 * When we have a better prefs system, this can go away.
383 * 383 *
384 * -- ChipX86 384 * -- ChipX86
385 */ 385 */
386 typedef enum
387 {
388 GAIM_GTKPOUNCE_NONE = 0x00, /**< No action. */
389 GAIM_GTKPOUNCE_OPEN_WIN = 0x01, /**< Open an IM window. */
390 GAIM_GTKPOUNCE_POPUP = 0x02, /**< Popup notification. */
391 GAIM_GTKPOUNCE_SEND_MSG = 0x04, /**< Send a message. */
392 GAIM_GTKPOUNCE_EXEC_CMD = 0x08, /**< Execute a command. */
393 GAIM_GTKPOUNCE_PLAY_SOUND = 0x10 /**< Play a sound. */
394
395 } GaimGtkPounceAction;
396
386 static int pounce_evt_trans_table[] = 397 static int pounce_evt_trans_table[] =
387 { 398 {
388 0x010, GAIM_POUNCE_SIGNON, 399 0x010, GAIM_POUNCE_SIGNON,
389 0x020, GAIM_POUNCE_AWAY_RETURN, 400 0x020, GAIM_POUNCE_AWAY_RETURN,
390 0x040, GAIM_POUNCE_IDLE_RETURN, 401 0x040, GAIM_POUNCE_IDLE_RETURN,
1644 1655
1645 account = gaim_account_find(ph->pouncer, ph->protocol); 1656 account = gaim_account_find(ph->pouncer, ph->protocol);
1646 1657
1647 old_pounce_opts_to_new(ph->options, &events, &actions); 1658 old_pounce_opts_to_new(ph->options, &events, &actions);
1648 1659
1649 pounce = gaim_gtkpounce_new(account, ph->name, events, actions, 1660 pounce = gaim_gtkpounce_new(account, ph->name, events);
1650 (*ph->message == '\0' ? NULL : ph->message), 1661
1651 (*ph->command == '\0' ? NULL : ph->command), 1662 gaim_pounce_action_set_enabled(pounce, "open-window",
1652 (*ph->sound == '\0' ? NULL : ph->sound), 1663 (actions & GAIM_GTKPOUNCE_OPEN_WIN));
1653 (ph->options & 0x100)); 1664 gaim_pounce_action_set_enabled(pounce, "popup-notify",
1665 (actions & GAIM_GTKPOUNCE_POPUP));
1666 gaim_pounce_action_set_enabled(pounce, "send-message",
1667 (actions & GAIM_GTKPOUNCE_SEND_MSG));
1668 gaim_pounce_action_set_enabled(pounce, "execute-command",
1669 (actions & GAIM_GTKPOUNCE_EXEC_CMD));
1670 gaim_pounce_action_set_enabled(pounce, "play-sound",
1671 (actions & GAIM_GTKPOUNCE_PLAY_SOUND));
1672
1673 gaim_pounce_action_set_attribute(pounce, "send-message", "message",
1674 (*ph->message == '\0' ? NULL : ph->message));
1675 gaim_pounce_action_set_attribute(pounce, "execute-command", "command",
1676 (*ph->sound == '\0' ? NULL : ph->message));
1677 gaim_pounce_action_set_attribute(pounce, "play-sound", "filename",
1678 (*ph->sound == '\0' ? NULL : ph->message));
1679
1680 gaim_pounce_set_save(pounce, (ph->options & 0x100));
1654 1681
1655 g_free(ph); 1682 g_free(ph);
1656 } 1683 }
1657 1684
1658 g_list_free(buddy_pounces); 1685 g_list_free(buddy_pounces);