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

« back to all changes in this revision

Viewing changes to illusion/src/applet-lightning.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2010-08-10 00:05:57 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100810000557-pfxoz5w7hbyclcqh
Tags: 2.2.0~0beta4-0ubuntu1
* New Upstream Version (LP: #614625)
* Fixed a few bugs on LP:
 - LP: #483963: Dustbin applet does not display trashes on all volumes
 - LP: #485159: Some apps have problem with Systray
 - LP: #500677: ~/.xsession-errors is too much used by CD
 - LP: #500979: Shortcuts: the order gets messed up
 - LP: #521531: Mail: crashes on Maildir
 - LP: #519915: GTG: create a new applet to control GTG
 - LP: #526138: GMenu doesn't handle desktop file exec strings properly
 - LP: #531317: CMake: Added an error if the prefix of 'cairo-dock-plugins'
                 is not the same 'cairo-dock-core'
 - LP: #531319: CMake: check the version of 'cairo-dock' when building
                 'cairo-dock-plugins'
 - LP: #537115: Click at the position where icon lavel was, the icon
                 and dock still receive the event
 - LP: #537943: Terminal applet shortkey behaviour
 - LP: #538637: Trash applet doesn't create .trashinfo files on XFCE
 - More details on the 'ChangeLog' file
* debian/rules:
 - Autotools has been replaced by CMake
 - cdbs is now used.
* debian/copyright:
 - Updated with the new applets
* debian/control:
 - Autotools has been replaced by CMake
 - Added libcurl4-gnutls-dev, libindicator-dev, libdbusmenu-glib-dev
   libido-0.1-dev, libical-dev, libdbusmenu-gtk-dev as Build-deps
 - Bump Standard-Version to 3.9.1
 - Wget is required for dnd2share applet
 - Added the exact realease for 'cairo-dock-dev' in order to prevent any
    build error if this package is not already available (thx to didrocks)
* debian/cairo-dock-plug-ins*.install:
 - All sonames are now installed into lib32 or lib64 (lib*)

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
        {
39
39
                l = &pData->pLightnings[i];
40
40
                l->iNbCurrentVertex = 2;
41
 
                l->pVertexTab = g_new0 (GLfloat, _CAIRO_DOCK_PATH_DIM * pData->iNbVertex);
 
41
                l->pVertexTab = g_new0 (GLfloat, 2 * pData->iNbVertex);
42
42
                for (j = 0; j < pData->iNbVertex; j ++)
43
43
                {
44
 
                        l->pVertexTab[_CAIRO_DOCK_PATH_DIM*j+1] = - (double) j / (pData->iNbVertex-1);  // on part d'en haut et on descend.
 
44
                        l->pVertexTab[2*j+1] = - (double) j / (pData->iNbVertex-1);  // on part d'en haut et on descend.
45
45
                }
46
46
        }
47
47
        
80
80
                alpha_t = 2 * (xbase/2) / (Nt * dx);  // correlation temporelle.
81
81
                alpha_s = 2 * (ximpact - xsource) / (Nv * dx);  // correlation spatiale.
82
82
                
83
 
                l->pVertexTab[_CAIRO_DOCK_PATH_DIM*0] = xsource;
 
83
                l->pVertexTab[2*0] = xsource;
84
84
                for (j = 1; j < pData->iNbVertex; j ++)
85
85
                {
86
 
                        xt = l->pVertexTab[_CAIRO_DOCK_PATH_DIM*j] + sign * (g_random_boolean () ? 1 + alpha_t * j/Nv : -1) * dx;  // correlation temporelle.
87
 
                        xs = l->pVertexTab[_CAIRO_DOCK_PATH_DIM*(j-1)] + (g_random_boolean () ? 1 + alpha_s : -1) * dx;  // correlation spatiale.
88
 
                        l->pVertexTab[_CAIRO_DOCK_PATH_DIM*j] = (xs + xt) / 2;  // correlation spatio-temporelle (et ouais).
 
86
                        xt = l->pVertexTab[2*j] + sign * (g_random_boolean () ? 1 + alpha_t * j/Nv : -1) * dx;  // correlation temporelle.
 
87
                        xs = l->pVertexTab[2*(j-1)] + (g_random_boolean () ? 1 + alpha_s : -1) * dx;  // correlation spatiale.
 
88
                        l->pVertexTab[2*j] = (xs + xt) / 2;  // correlation spatio-temporelle (et ouais).
89
89
                }
90
 
                l->pVertexTab[_CAIRO_DOCK_PATH_DIM*j] = ximpact;
 
90
                l->pVertexTab[2*j] = ximpact;
91
91
                l->iNbCurrentVertex = MIN (pData->iNbVertex, l->iNbCurrentVertex+1);
92
92
        }
93
93
        
149
149
        {
150
150
                l = &pData->pLightnings[i];
151
151
                
152
 
                _cairo_dock_set_vertex_pointer (l->pVertexTab);
153
 
                //cairo_dock_draw_current_path_opengl (1., myConfig.fLightningColor, l->iNbCurrentVertex);
 
152
                ///_cairo_dock_set_vertex_pointer (l->pVertexTab);
154
153
                glDrawArrays (GL_LINE_STRIP, 0, l->iNbCurrentVertex);
155
154
        }
156
155