30
30
#include "applet-firework.h"
31
31
#include "applet-init.h"
33
#define _register_effect(i, name, disp_name) do {\
34
cd_icon_effect_register_fire (&myData.pEffects[CD_ICON_EFFECT_FIRE]);\
35
myData.iAnimationID[CD_ICON_EFFECT_FIRE] = cairo_dock_register_animation (name, disp_name);\
36
myData.pEffects[CD_ICON_EFFECT_FIRE].iDuration = myConfig.iFireDuration;\
37
myData.pEffects[CD_ICON_EFFECT_FIRE].bRepeat = myConfig.bContinueFire; } while (0)
40
CD_APPLET_PRE_INIT_BEGIN (N_("icon effects"),
34
CD_APPLET_DEFINE_BEGIN (N_("icon effects"),
42
36
CAIRO_DOCK_CATEGORY_THEME,
43
N_("This plug-in adds many special effects to your icons."),
37
N_("This plugin adds many special effects to your icons."),
44
38
"Fabounet (Fabrice Rey)")
45
39
if (! g_bUseOpenGL)
47
CD_APPLET_DEFINE_COMMON_APPLET_INTERFACE
48
CD_APPLET_PRE_INIT_END
41
CD_APPLET_DEFINE_COMMON_APPLET_INTERFACE;
42
CD_APPLET_SET_CONTAINER_TYPE (CAIRO_DOCK_MODULE_IS_PLUGIN);
50
45
static inline void _set_effects_duration (void)
82
77
cairo_dock_register_notification (CAIRO_DOCK_STOP_ICON, (CairoDockNotificationFunc) cd_icon_effect_free_data, CAIRO_DOCK_RUN_AFTER, NULL);
84
79
cd_icon_effect_register_fire (&myData.pEffects[CD_ICON_EFFECT_FIRE]);
85
myData.iAnimationID[CD_ICON_EFFECT_FIRE] = cairo_dock_register_animation ("fire", D_("Fire"));
80
myData.iAnimationID[CD_ICON_EFFECT_FIRE] = cairo_dock_register_animation ("fire", D_("Fire"), TRUE);
87
82
cd_icon_effect_register_stars (&myData.pEffects[CD_ICON_EFFECT_STARS]);
88
myData.iAnimationID[CD_ICON_EFFECT_STARS] = cairo_dock_register_animation ("stars", D_("Stars"));
83
myData.iAnimationID[CD_ICON_EFFECT_STARS] = cairo_dock_register_animation ("stars", D_("Stars"), TRUE);
90
85
cd_icon_effect_register_rain (&myData.pEffects[CD_ICON_EFFECT_RAIN]);
91
myData.iAnimationID[CD_ICON_EFFECT_RAIN] = cairo_dock_register_animation ("rain", D_("Rain"));
86
myData.iAnimationID[CD_ICON_EFFECT_RAIN] = cairo_dock_register_animation ("rain", D_("Rain"), TRUE);
93
88
cd_icon_effect_register_snow (&myData.pEffects[CD_ICON_EFFECT_SNOW]);
94
myData.iAnimationID[CD_ICON_EFFECT_SNOW] = cairo_dock_register_animation ("snow", D_("Snow"));
89
myData.iAnimationID[CD_ICON_EFFECT_SNOW] = cairo_dock_register_animation ("snow", D_("Snow"), TRUE);
96
91
cd_icon_effect_register_storm (&myData.pEffects[CD_ICON_EFFECT_SAND]);
97
myData.iAnimationID[CD_ICON_EFFECT_SAND] = cairo_dock_register_animation ("storm", D_("Storm"));
92
myData.iAnimationID[CD_ICON_EFFECT_SAND] = cairo_dock_register_animation ("storm", D_("Storm"), TRUE);
99
94
cd_icon_effect_register_firework (&myData.pEffects[CD_ICON_EFFECT_FIREWORK]);
100
myData.iAnimationID[CD_ICON_EFFECT_FIREWORK] = cairo_dock_register_animation ("firework", D_("Firework"));
95
myData.iAnimationID[CD_ICON_EFFECT_FIREWORK] = cairo_dock_register_animation ("firework", D_("Firework"), TRUE);
102
97
_set_effects_duration ();