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

« back to all changes in this revision

Viewing changes to drop-indicator/src/applet-config.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:
21
21
#include <cairo-dock.h>
22
22
 
23
23
#include "applet-struct.h"
 
24
#include "applet-notifications.h"
24
25
#include "applet-config.h"
25
26
 
26
27
 
38
39
CD_APPLET_RESET_CONFIG_BEGIN
39
40
        g_free (myConfig.cDropIndicatorImageName);
40
41
        g_free (myConfig.cHoverIndicatorImageName);
41
 
        
42
42
CD_APPLET_RESET_CONFIG_END
43
43
 
44
44
 
45
45
//\_________________ Here you have to free all ressources allocated for myData. This one will be reseted to 0 at the end of this function. This function is called when your applet is stopped, in the very end.
46
 
void cd_drop_indicator_free_buffers (void)
47
 
{
48
 
        if (myData.iDropIndicatorTexture != 0)
49
 
        {
50
 
                _cairo_dock_delete_texture (myData.iDropIndicatorTexture);
51
 
                myData.iDropIndicatorTexture = 0;
52
 
        }
53
 
        
54
 
        if (myData.pDropIndicatorSurface != NULL)
55
 
        {
56
 
                cairo_surface_destroy (myData.pDropIndicatorSurface);
57
 
                myData.pDropIndicatorSurface = NULL;
58
 
        }
59
 
        
60
 
        if (myData.iHoverIndicatorTexture != 0)
61
 
        {
62
 
                _cairo_dock_delete_texture (myData.iHoverIndicatorTexture);
63
 
                myData.iHoverIndicatorTexture = 0;
64
 
        }
65
 
        
66
 
        if (myData.pHoverIndicatorSurface != NULL)
67
 
        {
68
 
                cairo_surface_destroy (myData.pHoverIndicatorSurface);
69
 
                myData.pHoverIndicatorSurface = NULL;
70
 
        }
71
 
}
72
 
 
73
 
void _reser_data_on_one_dock (gchar *cDockName, CairoDock *pDock, gpointer data)
 
46
static void _reset_data_on_one_dock (const gchar *cDockName, CairoDock *pDock, gpointer data)
74
47
{
75
48
        CDDropIndicatorData *pData = CD_APPLET_GET_MY_DOCK_DATA (pDock);
76
49
        if (pData == NULL)
77
50
                return ;
78
51
        g_free (pData);
 
52
        CD_APPLET_SET_MY_DOCK_DATA (pDock, NULL);
79
53
}
80
54
CD_APPLET_RESET_DATA_BEGIN
81
 
        /// free our data on all docks ..
82
 
        cairo_dock_foreach_docks ((GHFunc) _reser_data_on_one_dock, NULL);
 
55
        cairo_dock_foreach_docks ((GHFunc) _reset_data_on_one_dock, NULL);
83
56
        
84
57
        cd_drop_indicator_free_buffers ();
85
58