~cairo-dock-team/ubuntu/natty/cairo-dock-plug-ins/2.3.0-2.1

« back to all changes in this revision

Viewing changes to show-mouse/src/applet-init.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2010-08-10 00:05:57 UTC
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: james.westby@ubuntu.com-20100810000557-htcyq9gwo5f7r6ec
Tags: upstream-2.2.0~0beta4
ImportĀ upstreamĀ versionĀ 2.2.0~0beta4

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include "applet-init.h"
26
26
 
27
27
 
28
 
CD_APPLET_PRE_INIT_BEGIN(N_("show mouse"),
 
28
CD_APPLET_DEFINE_BEGIN (N_("show mouse"),
29
29
        2, 0, 0,
30
 
        CAIRO_DOCK_CATEGORY_PLUG_IN,
31
 
        N_("This plug-in draw some animation around the cursor when it's inside a dock/desklet."),
 
30
        CAIRO_DOCK_CATEGORY_APPLET_FUN,
 
31
        N_("This plugin draws some animations around the cursor when it's inside a dock/desklet."),
32
32
        "Fabounet (Fabrice Rey)")
33
33
        if (! g_bUseOpenGL)
34
34
                return FALSE;
35
35
        CD_APPLET_DEFINE_COMMON_APPLET_INTERFACE
36
 
CD_APPLET_PRE_INIT_END
 
36
        CD_APPLET_SET_CONTAINER_TYPE (CAIRO_DOCK_MODULE_IS_PLUGIN);
 
37
CD_APPLET_DEFINE_END
37
38
 
38
39
 
39
40
#define _cd_mouse_register_on_dock(...) \
78
79
 
79
80
 
80
81
//\___________ 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.
81
 
static void _free_dock_data (gchar *cDockName, CairoDock *pDock, gpointer data)
 
82
static void _free_dock_data (const gchar *cDockName, CairoDock *pDock, gpointer data)
82
83
{
83
84
        cd_show_mouse_free_data (data, CAIRO_CONTAINER (pDock));
84
85
}
85
 
static gboolean _free_desklet_data (CairoDesklet *pDesklet, CairoDockModuleInstance *pInstance, gpointer data)
 
86
static gboolean _free_desklet_data (CairoDesklet *pDesklet, gpointer data)
86
87
{
87
88
        cd_show_mouse_free_data (data, CAIRO_CONTAINER (pDesklet));
88
89
        return FALSE;
93
94
        cairo_dock_remove_notification_func (CAIRO_DOCK_STOP_DOCK, (CairoDockNotificationFunc) cd_show_mouse_free_data, NULL);
94
95
        cairo_dock_remove_notification_func (CAIRO_DOCK_STOP_DESKLET, (CairoDockNotificationFunc) cd_show_mouse_free_data, NULL);
95
96
        
96
 
        cairo_dock_foreach_docks (_free_dock_data, NULL);
 
97
        cairo_dock_foreach_docks ((GHFunc)_free_dock_data, NULL);
97
98
        cairo_dock_foreach_desklet (_free_desklet_data, NULL);
98
99
CD_APPLET_STOP_END
99
100