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

« back to all changes in this revision

Viewing changes to icon-effect/src/applet-notifications.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:
40
40
                pData = g_new0 (CDIconEffectData, 1);
41
41
                CD_APPLET_SET_MY_ICON_DATA (pIcon, pData);
42
42
        }
43
 
        double dt = mySystem.iGLAnimationDeltaT;
 
43
        double dt = cairo_dock_get_animation_delta_t (CAIRO_CONTAINER (pDock));
44
44
        
45
45
        CDIconEffectsEnum iEffect;
46
46
        CDIconEffect *pEffect;
83
83
        if (! CAIRO_DOCK_IS_DOCK (pDock) || pIcon == NULL || pIcon->iAnimationState > CAIRO_DOCK_STATE_CLICKED)
84
84
                return CAIRO_DOCK_LET_PASS_NOTIFICATION;
85
85
        
86
 
        CairoDockIconType iType = cairo_dock_get_icon_type (pIcon);
 
86
        CairoDockIconGroup iType = cairo_dock_get_icon_type (pIcon);
87
87
        if (iType == CAIRO_DOCK_LAUNCHER && CAIRO_DOCK_IS_APPLI (pIcon) && ! (iButtonState & GDK_SHIFT_MASK))
88
88
                iType = CAIRO_DOCK_APPLI;
89
 
        /**if (iType == CAIRO_DOCK_APPLI && CAIRO_DOCK_IS_LAUNCHER (pIcon) && iButtonState & GDK_SHIFT_MASK)
90
 
                iType = CAIRO_DOCK_LAUNCHER;*/
91
89
        
92
90
        gboolean bStartAnimation = _cd_icon_effect_start (pUserData, pIcon, pDock, myConfig.iEffectsOnClick[iType]);
93
91
        if (bStartAnimation)
108
106
        CDIconEffectsEnum iEffect = -1;
109
107
        if (strcmp (cAnimation, "default") == 0)
110
108
        {
111
 
                CairoDockIconType iType = cairo_dock_get_icon_type (pIcon);
 
109
                CairoDockIconGroup iType = cairo_dock_get_icon_type (pIcon);
112
110
                iEffect = myConfig.iEffectsOnClick[iType][0];
113
111
        }
114
112
        else
227
225
        
228
226
        if (pData->iRequestTime > 0)
229
227
        {
230
 
                int dt = mySystem.iGLAnimationDeltaT;
 
228
                int dt = cairo_dock_get_animation_delta_t (CAIRO_CONTAINER (pDock));
231
229
                pData->iRequestTime -= dt;
232
230
                if (pData->iRequestTime < 0)
233
231
                        pData->iRequestTime = 0;
252
250
                        pEffect->free (pData);
253
251
        }
254
252
        
255
 
        double fMaxScale = 1. + g_fAmplitude * pDock->fMagnitudeMax;
 
253
        double fMaxScale = 1. + myIconsParam.fAmplitude * pDock->fMagnitudeMax;
256
254
        GdkRectangle area;
257
255
        if (pDock->container.bIsHorizontal)
258
256
        {
270
268
                /*area.x = pIcon->fDrawX - .25 * pIcon->fWidth * fMaxScale;
271
269
                area.y = pIcon->fDrawY;
272
270
                area.width = pIcon->fWidth * fMaxScale * 1.5;
273
 
                area.height = pIcon->fHeight * fMaxScale + myLabels.iconTextDescription.iSize + 20 * fMaxScale;  // 20 = rayon max des particules, environ.
 
271
                area.height = pIcon->fHeight * fMaxScale + myIconsParam.iconTextDescription.iSize + 20 * fMaxScale;  // 20 = rayon max des particules, environ.
274
272
                if (pDock->container.bDirectionUp)
275
273
                {
276
 
                        area.y -= myLabels.iconTextDescription.iSize + pIcon->fHeight * (fMaxScale - 1);
 
274
                        area.y -= myIconsParam.iconTextDescription.iSize + pIcon->fHeight * (fMaxScale - 1);
277
275
                }
278
276
                else
279
277
                {
285
283
                /*area.y = pIcon->fDrawX - .25 * pIcon->fWidth * fMaxScale;
286
284
                area.x = pIcon->fDrawY;
287
285
                area.height = pIcon->fWidth * fMaxScale * 1.5;
288
 
                area.width = pIcon->fHeight * fMaxScale + myLabels.iconTextDescription.iSize + 20 * fMaxScale;
 
286
                area.width = pIcon->fHeight * fMaxScale + myIconsParam.iconTextDescription.iSize + 20 * fMaxScale;
289
287
                if (pDock->container.bDirectionUp)
290
288
                {
291
 
                        area.x -= myLabels.iconTextDescription.iSize + pIcon->fHeight * (fMaxScale - 1);
 
289
                        area.x -= myIconsParam.iconTextDescription.iSize + pIcon->fHeight * (fMaxScale - 1);
292
290
                }
293
291
                else
294
292
                {