~ubuntu-branches/ubuntu/quantal/cairo-dock-plug-ins/quantal-201208191523

« back to all changes in this revision

Viewing changes to Animated-icons/src/applet-init.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2011-04-20 20:46:51 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20110420204651-ftnpzesj6uc7qeul
Tags: 2.3.0~1-0ubuntu1
* New Upstream Version (LP: #723995)
* Upstream short ChangeLog (since 2.3.0~0rc1):
 - Updated translations
 - Updated the integration of the new versions of kwin and compiz
    (Switcher, ShowDesktop, etc.)
 - Removed a lot of useless g_print
 - Updated a few plug-ins to fit with the new version of the API (gldit)
 - Fixed a few bugs
 - Updated MeMenu, MessagingMenu and Status-Notifier to works
    with the latest version of dbusmenu, etc.
* Switch to dpkg-source 3.0 (quilt) format
* debian/cairo-dock-plug-ins.install:
 - Added new files (interfaces for python, ruby, vala and mono)
* debian/control:
 - Added new dependences for new applets (sensors and zeitgeist)
    and new interfaces (python, valac, ruby and mono)
 - Updated the version of cairo-dock build-dependences
* debian/rules:
 - Added a new CMake flag to install python interface in debian/tmp
* Updated debian/watch

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
        if (! cairo_dock_reserve_data_slot (myApplet))
45
45
                return;
46
46
        
47
 
        cairo_dock_register_notification (CAIRO_DOCK_ENTER_ICON, (CairoDockNotificationFunc) cd_animations_on_enter, CAIRO_DOCK_RUN_AFTER, NULL);
48
 
        cairo_dock_register_notification (CAIRO_DOCK_CLICK_ICON, (CairoDockNotificationFunc) cd_animations_on_click, CAIRO_DOCK_RUN_FIRST, NULL);
49
 
        cairo_dock_register_notification (CAIRO_DOCK_REQUEST_ICON_ANIMATION, (CairoDockNotificationFunc) cd_animations_on_request, CAIRO_DOCK_RUN_FIRST, NULL);
50
 
        cairo_dock_register_notification (CAIRO_DOCK_UPDATE_ICON, (CairoDockNotificationFunc) cd_animations_update_icon , CAIRO_DOCK_RUN_AFTER, NULL);
51
 
        cairo_dock_register_notification (CAIRO_DOCK_RENDER_ICON, (CairoDockNotificationFunc) cd_animations_render_icon, CAIRO_DOCK_RUN_FIRST, NULL);
52
 
        cairo_dock_register_notification (CAIRO_DOCK_RENDER_ICON, (CairoDockNotificationFunc) cd_animations_post_render_icon, CAIRO_DOCK_RUN_AFTER, NULL);
53
 
        cairo_dock_register_notification (CAIRO_DOCK_STOP_ICON, (CairoDockNotificationFunc) cd_animations_free_data, CAIRO_DOCK_RUN_AFTER, NULL);
54
 
        cairo_dock_register_notification (CAIRO_DOCK_UNFOLD_SUBDOCK, (CairoDockNotificationFunc) cd_animations_unfold_subdock, CAIRO_DOCK_RUN_AFTER, NULL);
 
47
        cairo_dock_register_notification_on_object (&myContainersMgr,
 
48
                NOTIFICATION_ENTER_ICON,
 
49
                (CairoDockNotificationFunc) cd_animations_on_enter,
 
50
                CAIRO_DOCK_RUN_AFTER, NULL);
 
51
        cairo_dock_register_notification_on_object (&myContainersMgr,
 
52
                NOTIFICATION_CLICK_ICON,
 
53
                (CairoDockNotificationFunc) cd_animations_on_click,
 
54
                CAIRO_DOCK_RUN_FIRST, NULL);
 
55
        cairo_dock_register_notification_on_object (&myIconsMgr,
 
56
                NOTIFICATION_REQUEST_ICON_ANIMATION,
 
57
                (CairoDockNotificationFunc) cd_animations_on_request,
 
58
                CAIRO_DOCK_RUN_FIRST, NULL);
 
59
        cairo_dock_register_notification_on_object (&myIconsMgr,
 
60
                NOTIFICATION_UPDATE_ICON,
 
61
                (CairoDockNotificationFunc) cd_animations_update_icon,
 
62
                CAIRO_DOCK_RUN_AFTER, NULL);
 
63
        cairo_dock_register_notification_on_object (&myIconsMgr,
 
64
                NOTIFICATION_RENDER_ICON,
 
65
                (CairoDockNotificationFunc) cd_animations_render_icon,
 
66
                CAIRO_DOCK_RUN_FIRST, NULL);
 
67
        cairo_dock_register_notification_on_object (&myIconsMgr,
 
68
                NOTIFICATION_RENDER_ICON,
 
69
                (CairoDockNotificationFunc) cd_animations_post_render_icon,
 
70
                CAIRO_DOCK_RUN_AFTER, NULL);
 
71
        cairo_dock_register_notification_on_object (&myIconsMgr,
 
72
                NOTIFICATION_STOP_ICON,
 
73
                (CairoDockNotificationFunc) cd_animations_free_data,
 
74
                CAIRO_DOCK_RUN_AFTER, NULL);
 
75
        cairo_dock_register_notification_on_object (&myIconsMgr,
 
76
                NOTIFICATION_UNFOLD_SUBDOCK,
 
77
                (CairoDockNotificationFunc) cd_animations_unfold_subdock,
 
78
                CAIRO_DOCK_RUN_AFTER, NULL);
55
79
        
56
80
        myData.iAnimationID[CD_ANIMATIONS_BOUNCE] = cairo_dock_register_animation ("bounce", D_("Bounce"), FALSE);
57
81
        myData.iAnimationID[CD_ANIMATIONS_ROTATE] = cairo_dock_register_animation ("rotate", D_("Rotate"), FALSE);
60
84
        myData.iAnimationID[CD_ANIMATIONS_WOBBLY] = cairo_dock_register_animation ("wobbly", D_("Wobbly"), FALSE);
61
85
        myData.iAnimationID[CD_ANIMATIONS_WAVE] = cairo_dock_register_animation ("wave", D_("Wave"), FALSE);
62
86
        myData.iAnimationID[CD_ANIMATIONS_SPOT] = cairo_dock_register_animation ("spot", D_("Spot"), FALSE);
63
 
        
64
 
        if (! cairo_dock_is_loading ())
65
 
                cairo_dock_update_animations_list_for_gui ();
66
87
CD_APPLET_INIT_END
67
88
 
68
89
static void _free_data_on_icon (Icon *pIcon, CairoDock *pDock, gpointer data)
71
92
}
72
93
//\___________ Here is where you stop your applet. myConfig and myData are still valid, but will be reseted to 0 at the end of the function. In the end, your applet will go back to its original state, as if it had never been activated.
73
94
CD_APPLET_STOP_BEGIN
74
 
        cairo_dock_remove_notification_func (CAIRO_DOCK_ENTER_ICON, (CairoDockNotificationFunc) cd_animations_on_enter, NULL);
75
 
        cairo_dock_remove_notification_func (CAIRO_DOCK_CLICK_ICON, (CairoDockNotificationFunc) cd_animations_on_click, NULL);
76
 
        cairo_dock_remove_notification_func (CAIRO_DOCK_REQUEST_ICON_ANIMATION, (CairoDockNotificationFunc) cd_animations_on_request, NULL);
77
 
        cairo_dock_remove_notification_func (CAIRO_DOCK_UPDATE_ICON, (CairoDockNotificationFunc) cd_animations_update_icon, NULL);
78
 
        cairo_dock_remove_notification_func (CAIRO_DOCK_RENDER_ICON, (CairoDockNotificationFunc) cd_animations_render_icon, NULL);
79
 
        cairo_dock_remove_notification_func (CAIRO_DOCK_RENDER_ICON, (CairoDockNotificationFunc) cd_animations_post_render_icon, NULL);
80
 
        cairo_dock_remove_notification_func (CAIRO_DOCK_STOP_ICON, (CairoDockNotificationFunc) cd_animations_free_data, NULL);
81
 
        cairo_dock_remove_notification_func (CAIRO_DOCK_UNFOLD_SUBDOCK, (CairoDockNotificationFunc) cd_animations_unfold_subdock, NULL);
 
95
        cairo_dock_remove_notification_func_on_object (&myContainersMgr,
 
96
                NOTIFICATION_ENTER_ICON,
 
97
                (CairoDockNotificationFunc) cd_animations_on_enter, NULL);
 
98
        cairo_dock_remove_notification_func_on_object (&myContainersMgr,
 
99
                NOTIFICATION_CLICK_ICON,
 
100
                (CairoDockNotificationFunc) cd_animations_on_click, NULL);
 
101
        cairo_dock_remove_notification_func_on_object (&myIconsMgr,
 
102
                NOTIFICATION_REQUEST_ICON_ANIMATION,
 
103
                (CairoDockNotificationFunc) cd_animations_on_request, NULL);
 
104
        cairo_dock_remove_notification_func_on_object (&myIconsMgr,
 
105
                NOTIFICATION_UPDATE_ICON,
 
106
                (CairoDockNotificationFunc) cd_animations_update_icon, NULL);
 
107
        cairo_dock_remove_notification_func_on_object (&myIconsMgr,
 
108
                NOTIFICATION_RENDER_ICON,
 
109
                (CairoDockNotificationFunc) cd_animations_render_icon, NULL);
 
110
        cairo_dock_remove_notification_func_on_object (&myIconsMgr,
 
111
                NOTIFICATION_RENDER_ICON,
 
112
                (CairoDockNotificationFunc) cd_animations_post_render_icon, NULL);
 
113
        cairo_dock_remove_notification_func_on_object (&myIconsMgr,
 
114
                NOTIFICATION_STOP_ICON,
 
115
                (CairoDockNotificationFunc) cd_animations_free_data, NULL);
 
116
        cairo_dock_remove_notification_func_on_object (&myIconsMgr,
 
117
                NOTIFICATION_UNFOLD_SUBDOCK,
 
118
                (CairoDockNotificationFunc) cd_animations_unfold_subdock, NULL);
82
119
        
83
120
        cairo_dock_unregister_animation ("bounce");
84
121
        cairo_dock_unregister_animation ("rotate");
87
124
        cairo_dock_unregister_animation ("wobbly");
88
125
        cairo_dock_unregister_animation ("wave");
89
126
        cairo_dock_unregister_animation ("spot");
90
 
        cairo_dock_update_animations_list_for_gui ();
91
127
        
92
128
        cairo_dock_foreach_icons ((CairoDockForeachIconFunc) _free_data_on_icon, NULL);
93
129
CD_APPLET_STOP_END