~ubuntu-branches/ubuntu/oneiric/cairo-dock-plug-ins/oneiric-proposed

« back to all changes in this revision

Viewing changes to Cairo-Penguin/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:
47
47
        
48
48
        penguin_start_animating_with_delay (myApplet);
49
49
        
50
 
        cairo_dock_register_notification (CAIRO_DOCK_CLICK_ICON,
 
50
        cairo_dock_register_notification_on_object (myContainer,
 
51
                NOTIFICATION_CLICK_ICON,
51
52
                (CairoDockNotificationFunc) CD_APPLET_ON_CLICK_FUNC,
52
53
                CAIRO_DOCK_RUN_FIRST,
53
54
                myApplet);
54
 
        cairo_dock_register_notification (CAIRO_DOCK_MIDDLE_CLICK_ICON,
 
55
        cairo_dock_register_notification_on_object (myContainer,
 
56
                NOTIFICATION_MIDDLE_CLICK_ICON,
55
57
                (CairoDockNotificationFunc) CD_APPLET_ON_MIDDLE_CLICK_FUNC,
56
58
                CAIRO_DOCK_RUN_FIRST,
57
59
                myApplet);
58
 
        CD_APPLET_REGISTER_FOR_BUILD_MENU_EVENT;
 
60
        cairo_dock_register_notification_on_object (myContainer,
 
61
                NOTIFICATION_BUILD_ICON_MENU,
 
62
                (CairoDockNotificationFunc) CD_APPLET_ON_BUILD_MENU_FUNC,
 
63
                CAIRO_DOCK_RUN_FIRST,
 
64
                myApplet);
 
65
        cairo_dock_register_notification_on_object (myDock,
 
66
                NOTIFICATION_STOP_DOCK,
 
67
                (CairoDockNotificationFunc) cd_on_dock_destroyed,
 
68
                CAIRO_DOCK_RUN_AFTER,
 
69
                myApplet);
59
70
CD_APPLET_INIT_END
60
71
 
61
72
 
62
73
CD_APPLET_STOP_BEGIN
63
74
        //\_______________ On se desabonne de nos notifications.
64
 
        CD_APPLET_UNREGISTER_FOR_CLICK_EVENT;
65
 
        CD_APPLET_UNREGISTER_FOR_MIDDLE_CLICK_EVENT;
66
 
        CD_APPLET_UNREGISTER_FOR_BUILD_MENU_EVENT;
 
75
        cairo_dock_remove_notification_func_on_object (myContainer,
 
76
                NOTIFICATION_CLICK_ICON,
 
77
                (CairoDockNotificationFunc) CD_APPLET_ON_CLICK_FUNC,
 
78
                myApplet);
 
79
        cairo_dock_remove_notification_func_on_object (myContainer,
 
80
                NOTIFICATION_MIDDLE_CLICK_ICON,
 
81
                (CairoDockNotificationFunc) CD_APPLET_ON_MIDDLE_CLICK_FUNC,
 
82
                myApplet);
 
83
        cairo_dock_remove_notification_func_on_object (myContainer,
 
84
                NOTIFICATION_BUILD_ICON_MENU,
 
85
                (CairoDockNotificationFunc) CD_APPLET_ON_BUILD_MENU_FUNC,
 
86
                myApplet);
 
87
        cairo_dock_remove_notification_func_on_object (myDock,
 
88
                NOTIFICATION_STOP_DOCK,
 
89
                (CairoDockNotificationFunc) cd_on_dock_destroyed,
 
90
                myApplet);
67
91
        penguin_remove_notfications();
68
92
        
69
93
        if (myData.iSidRestartDelayed != 0)
94
118
                        area.x = (myDock->container.iWidth - myDock->fFlatDockWidth) / 2 + myData.iCurrentPositionX;
95
119
                        area.y = myDock->container.iHeight - myData.iCurrentPositionY - pAnimation->iFrameHeight;
96
120
                        area.width = pAnimation->iFrameWidth;
97
 
                        area.height = pAnimation->iFrameHeight + myDock->container.bUseReflect * g_fReflectSize;
 
121
                        area.height = pAnimation->iFrameHeight + myDock->container.bUseReflect * myIconsParam.fReflectSize;
98
122
                        gdk_window_invalidate_rect (myContainer->pWidget->window, &area, FALSE);
99
123
                }
100
124
                
101
125
                //\_______________ On recharge tout de zero (changement de theme).
102
 
                reset_data (myApplet);  // applet multi-instance => ok.
 
126
                cd_penguin_reset_data (myApplet);
103
127
                
104
128
                penguin_load_theme (myApplet, myConfig.cThemePath);
105
129
                
106
130
                //\_______________ On libere le pingouin ou au contraire on le cloisonne.
107
131
                if (myConfig.bFree)
108
132
                {
109
 
                        cairo_dock_detach_icon_from_dock (myIcon, myDock, myIcons.iSeparateIcons);
 
133
                        cairo_dock_detach_icon_from_dock (myIcon, myDock, myIconsParam.iSeparateIcons);
110
134
                        cairo_dock_update_dock_size (myDock);
111
135
                }
112
136
                else
118
142
        }
119
143
        else
120
144
        {
121
 
                // rien a faire, la taille du pinguoin est fixe.
 
145
                // rien a faire, la taille du pingouin est fixe.
122
146
        }
123
147
CD_APPLET_RELOAD_END