~ubuntu-branches/ubuntu/precise/cairo-dock-plug-ins/precise

« back to all changes in this revision

Viewing changes to Status-Notifier/src/applet-draw.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe), Matthieu Baerts (matttbe), Didier Roche
  • Date: 2010-09-18 14:20:27 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100918142027-b0zsay70mqxv63l0
Tags: 2.2.0~2-0ubuntu1
[ Matthieu Baerts (matttbe) ]
* New Upstream Version (LP: #638529)
* Fixed a few bugs on LP:
 - Fixed a crash in rainbow view when the cone is completely opened
 - Fixed a crash in rainbow view if the subdock is empty
 - Installed in lib directory by default even in 64bits arch
 - Status-Notifier: fixed few bugs
 - Clock applet:
   - Notify of missed tasks (moved some functions to a new file)
   - Fixed a little memory leak
 - Removed some 'g_print' (LP: #500677: xsession-errors log)
* Updated translations
* debian/control
 - Updated the version of cairo-dock-dev and cairo-dock-core

[ Didier Roche ]
* debian/control: depends on latest libindicator-dev (LP: #637692)

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
                        myData.iItemSize = iSize;
63
63
                }
64
64
        }
65
 
        g_print ("satus_notifier : %dx%d\n", myData.iNbLines, myData.iNbColumns);
 
65
        //g_print ("satus_notifier : %dx%d\n", myData.iNbLines, myData.iNbColumns);
66
66
}
67
67
 
68
68
 
69
69
void cd_satus_notifier_draw_compact_icon (void)
70
70
{
71
 
        g_print ("%s ()\n", __func__);
 
71
        //g_print ("%s ()\n", __func__);
72
72
        int iWidth, iHeight;
73
73
        CD_APPLET_GET_MY_ICON_EXTENT (&iWidth, &iHeight);
74
74
        
133
133
 
134
134
void cd_satus_notifier_reload_compact_mode (void)
135
135
{
136
 
        g_print ("%s ()\n", __func__);
 
136
        //g_print ("%s ()\n", __func__);
137
137
        // re-compute the grid.
138
138
        int iPrevSize = myData.iItemSize;
139
139
        cd_satus_notifier_compute_grid ();
140
140
        
141
141
        // reload surfaces if their size has changed.
142
 
        g_print (" size: %d -> %d\n", iPrevSize, myData.iItemSize);
 
142
        //g_print (" size: %d -> %d\n", iPrevSize, myData.iItemSize);
143
143
        CDStatusNotifierItem *pItem;
144
144
        GList *it;
145
145
        for (it = myData.pItems; it != NULL; it = it->next)
172
172
                return NULL;
173
173
        
174
174
        int iMouseX, iMouseY;
175
 
        iMouseX = myContainer->iMouseX;
176
 
        iMouseY = myContainer->iMouseY;
 
175
        iMouseX = myContainer->iMouseX - myIcon->fDrawX;
 
176
        iMouseY = myContainer->iMouseY - myIcon->fDrawY;
177
177
        
 
178
        //g_print ("%s (%d;%d)\n", __func__, iMouseX, iMouseY);
178
179
        // get index on the grid.
179
180
        int iWidth, iHeight;
180
181
        CD_APPLET_GET_MY_ICON_EXTENT (&iWidth, &iHeight);
194
195
                pItem = it->data;
195
196
                if (pItem->pSurface != NULL && pItem->iStatus != CD_STATUS_PASSIVE)
196
197
                {
197
 
                        j ++;
198
 
                        if (j == myData.iNbColumns)  // next line.
199
 
                        {
200
 
                                j = 0;
201
 
                                i ++;
202
 
                        }
203
198
                        if (i == line && j == col)
204
199
                        {
205
200
                                pFoundItem = pItem;
206
201
                                break;
207
202
                        }
 
203
                        j ++;
 
204
                        if (j == myData.iNbColumns)  // next line.
 
205
                        {
 
206
                                j = 0;
 
207
                                i ++;
 
208
                        }
208
209
                }
209
210
        }
210
211