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

« back to all changes in this revision

Viewing changes to dustbin/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:
23
23
#include <cairo-dock.h>
24
24
 
25
25
#include "applet-struct.h"
26
 
#include "applet-draw.h"
27
26
#include "applet-trashes-manager.h"
28
27
#include "applet-config.h"
29
28
 
30
29
 
31
30
CD_APPLET_GET_CONFIG_BEGIN
32
 
        //\_______________ On recupere la liste des repertoires faisant office de poubelle.
33
 
        gsize length = 0;
34
 
        myConfig.cAdditionnalDirectoriesList = CD_CONFIG_GET_STRING_LIST ("Module", "additionnal directories", &length);
35
 
        
36
 
        //\_______________ On liste les themes disponibles et on recupere celui choisi.
37
 
        myConfig.cThemePath = CD_CONFIG_GET_THEME_PATH ("Module", "theme", "themes", "Gion");
38
 
        
39
 
        myConfig.cEmptyUserImage = CD_CONFIG_GET_STRING ("Module", "empty image");
40
 
        myConfig.cFullUserImage = CD_CONFIG_GET_STRING ("Module", "full image");
41
 
        
42
 
        myConfig.iSizeLimit = CD_CONFIG_GET_INTEGER ("Module", "size limit") << 20;  // en Mo.
43
 
        myConfig.iGlobalSizeLimit = CD_CONFIG_GET_INTEGER ("Module", "global size limit") << 20;  // en Mo.
44
 
        myConfig.iQuickInfoType = CD_CONFIG_GET_INTEGER_WITH_DEFAULT ("Module", "quick info", CD_DUSTBIN_INFO_NB_TRASHES);
45
 
        myConfig.bAskBeforeDelete = CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT ("Module", "confirm", TRUE);
46
 
        
47
 
        myConfig.fCheckInterval = CD_CONFIG_GET_DOUBLE_WITH_DEFAULT ("Module", "check interval", 2.);
48
 
        
49
 
        myConfig.cDefaultBrowser = CD_CONFIG_GET_STRING ("Module", "alternative file browser");
 
31
        CD_CONFIG_RENAME_GROUP ("Module", "Configuration");
 
32
        
 
33
        myConfig.cThemePath = CD_CONFIG_GET_THEME_PATH ("Configuration", "theme", "themes", "default");
 
34
        if (myConfig.cThemePath == NULL)
 
35
                myConfig.cThemePath = g_strdup ("default");
 
36
        myConfig.cEmptyUserImage = CD_CONFIG_GET_STRING ("Configuration", "empty image");
 
37
        myConfig.cFullUserImage = CD_CONFIG_GET_STRING ("Configuration", "full image");
 
38
        
 
39
        myConfig.iQuickInfoType = CD_CONFIG_GET_INTEGER_WITH_DEFAULT ("Configuration", "quick info", CD_DUSTBIN_INFO_NB_TRASHES);
 
40
        myConfig.bAskBeforeDelete = CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT ("Configuration", "confirm", TRUE);
 
41
        myConfig.iActionOnMiddleClick = CD_CONFIG_GET_INTEGER ("Configuration", "middle click");
50
42
CD_APPLET_GET_CONFIG_END
51
43
 
52
44
 
53
45
CD_APPLET_RESET_CONFIG_BEGIN
54
 
        g_strfreev (myConfig.cAdditionnalDirectoriesList);
55
 
        
56
46
        g_free (myConfig.cThemePath);
57
47
        g_free (myConfig.cEmptyUserImage);
58
48
        g_free (myConfig.cFullUserImage);
59
 
        
60
 
        g_free (myConfig.cDefaultBrowser);
61
49
CD_APPLET_RESET_CONFIG_END
62
50
 
63
51
 
64
52
CD_APPLET_RESET_DATA_BEGIN
65
 
        g_atomic_int_set (&myData.iQuickInfoValue, 0);
66
 
        
67
 
        if (myData.pEmptyBinSurface != NULL)
68
 
        {
69
 
                cairo_surface_destroy (myData.pEmptyBinSurface);
70
 
        }
71
 
        if (myData.pFullBinSurface != NULL)
72
 
        {
73
 
                cairo_surface_destroy (myData.pFullBinSurface);
74
 
        }
75
 
        
76
 
        g_free (myData.cDialogIconPath);
77
 
        
78
 
        cd_dustbin_remove_all_dustbins ();
 
53
        
79
54
CD_APPLET_RESET_DATA_END