~ubuntu-branches/ubuntu/precise/cairo-dock/precise-proposed

« back to all changes in this revision

Viewing changes to src/gldit/cairo-dock-flying-container.c

  • Committer: Bazaar Package Importer
  • Author(s): Iain Lane, Matthieu Baerts (matttbe)
  • Date: 2011-10-11 10:53:26 UTC
  • mfrom: (1.1.20 upstream)
  • Revision ID: james.westby@ubuntu.com-20111011105326-8s3yzoeu3wr15k9p
Tags: 2.4.0~2-0ubuntu1
[ Matthieu Baerts (matttbe) ]
* New upstream bug fix release. (LP: #859982)
* Upstream (short) ChangeLog (2.4.0~0beta2 -> 2.4.0~1):
 - Improved support of the new Gnome 3 session
    (to avoid conflicts with the new Gnome-Panel).
 - Code cleaned and re-organised a few functions
    (e.g. with cairo-dock-overlay, cairo-dock.c, etc.)
 - Updating translations
 - Improved the support of XFCE and LXDE environments
 - Removed invalid launcher desktop files
 - Used a default icon if the path set by the user is wrong
 - Fixed the possibility to sticky a desklet (bug due to a Xorg update)
 - GUI: fixed the list-entry widget
 - Fixed support of the Widget Layer in Compiz >= 0.9
 - Compiz type filter: replaced type=utility by type=Utility
 - Fixed a small refresh bug in cairo mode
    (with icons that are always visible)
 - Improved the placement of icons when avoiding the mouse
    (when something is being dropped onto the dock)
 - Updated the default theme in order to use new applications
 - Gauge implementation: Rewritten to use CairoDockImageBuffer
    and fixed the problem with png images
 - Graphs: Improved the drawing and added more precisions
 - Improved the 'lock' option description
 - GUI simple: fixed a bad update of the parameters
    when switching back to the previous value
 - Fixed the path of the preview for the default view
 - Help: Fixed the problem with tips
 - Default-theme: .conf files: fixed lintian warnings
 - Fixed a few warnings at the compilation
 - Removed a few useless output messages
 - Fixed these LP bugs:
  + Cairo-dock corrupts Kdenlive monitor display LP: #729970
  + Can't play videos in kaffeine LP: #475375
 - And fixed a lot of tiny bugs, please have a look to bzr logs.
* Upstream (short) ChangeLog (2.4.0~1 -> 2.4.0~2):
 - Fixed a bug with the detection of compiz plugins
 - doc: used the right version
 - Fixed a possible crash with an empty dock LP: #861725
 - FlyingContainer: draw the icon correctly
* debian/patches:
 - Removed 01-musicPlayer_with_banshee: now in upstream
* debian/copyright:
 - Updated and fixed lintian warnings: old-fsf-address-in-copyright-file
* debian/rules and debian/cairo-dock-data.install:
 - Added support of the new Gnome 3 session.
* debian/control:
 - Fixed lintian warning: description-synopsis-starts-with-article
 - Fixed lintian error: version-substvar-for-external-package
* debian/cairo-dock-data.lintian-overrides:
 - Removed old warnings (fixed)
 - Added binary-without-manpage (custom scripts used)
* debian/cairo-dock-core.install and debian/cairo-dock-dev.install:
 - Fixed a lintian warning: non-dev-pkg-with-shlib-symlink
* debian/patches/01-improved-cairo-dock-session.patch:
 - Improved the launch of our Cairo-Dock session (by removing Unity
    Compiz plugin and by launching the dock with a short delay)
 - Fixed lintian error: shell-script-fails-syntax-check
    (it seems I made wrong manipulation with vim...)
* debian/patches/02-manpage-not-compressed-with-max-compression.patch:
 - Fixed this lintian error: manpage-not-compressed-with-max-compression

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
static double s_fExplosionWidth, s_fExplosionHeight;
68
68
static CairoEmblem *s_pEmblem = NULL;
69
69
 
70
 
static void _cairo_dock_load_emblem (Icon *pIcon, CairoFlyingContainer *pFlyingContainer)
 
70
static void _cairo_dock_load_emblem (Icon *pIcon)
71
71
{
72
72
        cairo_dock_free_emblem (s_pEmblem);
73
73
        const gchar *cImage = NULL;
80
80
                cImage = GTK_STOCK_DELETE;
81
81
        }
82
82
        gchar *cIcon = cairo_dock_search_icon_s_path (cImage);
83
 
        s_pEmblem = cairo_dock_make_emblem (cIcon, pIcon, CAIRO_CONTAINER (pFlyingContainer));
 
83
        s_pEmblem = cairo_dock_make_emblem (cIcon, pIcon);
84
84
        cairo_dock_set_emblem_position (s_pEmblem, CAIRO_DOCK_EMBLEM_UPPER_LEFT);
85
85
        g_free (cIcon);
86
86
}
133
133
 
134
134
static gboolean _cairo_dock_render_flying_container_notification (gpointer pUserData, CairoFlyingContainer *pFlyingContainer, cairo_t *pCairoContext)
135
135
{
 
136
        // it seems this function is called 2 times
136
137
        Icon *pIcon = pFlyingContainer->pIcon;
137
138
        if (pCairoContext != NULL)
138
139
        {
139
140
                if (pIcon != NULL)
140
141
                {
141
142
                        cairo_save (pCairoContext);
142
 
                        cairo_dock_render_one_icon (pIcon, CAIRO_CONTAINER (pFlyingContainer), pCairoContext, 1., FALSE);
 
143
                        
 
144
                        cairo_translate (pCairoContext, pIcon->fDrawX, pIcon->fDrawY);
 
145
                        if (pIcon->pIconBuffer != NULL)  // we can't use cairo_dock_render_one_icon() here since it's not a dock, and anyway we don't need it.
 
146
                        {
 
147
                                cairo_save (pCairoContext);
 
148
                                
 
149
                                cairo_dock_set_icon_scale_on_context (pCairoContext, pIcon, pFlyingContainer->container.bIsHorizontal, pFlyingContainer->container.fRatio, pFlyingContainer->container.bDirectionUp);
 
150
                                cairo_set_source_surface (pCairoContext, pIcon->pIconBuffer, 0.0, 0.0);
 
151
                                cairo_paint (pCairoContext);
 
152
                                
 
153
                                cairo_restore (pCairoContext);
 
154
                        }
 
155
                        
143
156
                        cairo_restore (pCairoContext);
144
157
                        
145
158
                        _cairo_dock_apply_emblem_surface (s_pEmblem, pFlyingContainer->container.iWidth, pFlyingContainer->container.iHeight, pCairoContext);
169
182
                if (pIcon != NULL)
170
183
                {
171
184
                        glPushMatrix ();
172
 
                        /*glTranslatef (pFlyingContainer->container.iWidth / 2,
173
 
                                pIcon->fHeight * pIcon->fScale/2,
174
 
                                - pFlyingContainer->container.iHeight);*/
175
 
                        cairo_dock_render_one_icon_opengl (pIcon, CAIRO_CONTAINER (pFlyingContainer), 1., FALSE);
 
185
 
 
186
                        cairo_dock_translate_on_icon_opengl (pIcon, CAIRO_CONTAINER (pFlyingContainer), 1.);
 
187
                        cairo_dock_draw_icon_texture (pIcon, CAIRO_CONTAINER (pFlyingContainer));
 
188
 
176
189
                        glPopMatrix ();
177
190
                        
178
191
                        glPushMatrix ();
304
317
        pFlyingContainer->container.bInside = TRUE;
305
318
        pFlyingIcon->bPointed = TRUE;
306
319
        pFlyingIcon->fScale = 1.;
 
320
        pFlyingIcon->fAlpha = 1.;
307
321
        
308
322
        pFlyingContainer->container.iWidth = pFlyingIcon->fWidth * pFlyingIcon->fScale * 1.333;
309
323
        pFlyingContainer->container.iHeight = pFlyingIcon->fHeight * pFlyingIcon->fScale * 1.333;
337
351
                pFlyingContainer->container.iWindowPositionX,
338
352
                pFlyingContainer->container.iWindowPositionY);*/
339
353
        
340
 
        _cairo_dock_load_emblem (pFlyingIcon, pFlyingContainer);
 
354
        _cairo_dock_load_emblem (pFlyingIcon);
341
355
        _cairo_dock_load_explosion_image (pFlyingContainer->container.iWidth);
342
356
        
343
357
        struct timeval tv;