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

« back to all changes in this revision

Viewing changes to tomboy/src/tomboy-config.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2009-08-26 21:07:39 UTC
  • Revision ID: james.westby@ubuntu.com-20090826210739-gyjuuqezrzuluao4
Tags: upstream-2.0.8.1
ImportĀ upstreamĀ versionĀ 2.0.8.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
* This file is a part of the Cairo-Dock project
 
3
*
 
4
* Copyright : (C) see the 'copyright' file.
 
5
* E-mail    : see the 'copyright' file.
 
6
*
 
7
* This program is free software; you can redistribute it and/or
 
8
* modify it under the terms of the GNU General Public License
 
9
* as published by the Free Software Foundation; either version 3
 
10
* of the License, or (at your option) any later version.
 
11
*
 
12
* This program is distributed in the hope that it will be useful,
 
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
* GNU General Public License for more details.
 
16
* You should have received a copy of the GNU General Public License
 
17
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
18
*/
 
19
 
 
20
#include <string.h>
 
21
 
 
22
#include "tomboy-struct.h"
 
23
#include "tomboy-dbus.h"
 
24
#include "tomboy-config.h"
 
25
 
 
26
 
 
27
 
 
28
CD_APPLET_GET_CONFIG_BEGIN
 
29
        myConfig.defaultTitle           = CD_CONFIG_GET_STRING ("Icon", "name");
 
30
        myConfig.cIconDefault           = CD_CONFIG_GET_STRING ("Icon", "default icon");
 
31
        myConfig.cIconClose             = CD_CONFIG_GET_STRING ("Icon", "close icon");
 
32
        myConfig.cIconBroken            = CD_CONFIG_GET_STRING ("Icon", "broken icon");
 
33
        myConfig.bNoDeletedSignal       = CD_CONFIG_GET_BOOLEAN ("Configuration", "no deleted signal");
 
34
        myConfig.cRenderer              = CD_CONFIG_GET_STRING ("Configuration", "renderer");
 
35
        myConfig.bDrawContent           = CD_CONFIG_GET_BOOLEAN ("Configuration", "draw content");
 
36
        myConfig.cDateFormat            = CD_CONFIG_GET_STRING ("Configuration", "date format");
 
37
        if (myConfig.cDateFormat == NULL)
 
38
                myConfig.cDateFormat = g_strdup ("%d/%m/%y");
 
39
        myConfig.bAutoNaming = CD_CONFIG_GET_BOOLEAN ("Configuration", "auto-naming");
 
40
        myConfig.bAskBeforeDelete = CD_CONFIG_GET_BOOLEAN ("Configuration", "ask delete");
 
41
CD_APPLET_GET_CONFIG_END
 
42
 
 
43
 
 
44
CD_APPLET_RESET_CONFIG_BEGIN
 
45
        g_free (myConfig.defaultTitle);
 
46
        
 
47
        g_free (myConfig.cIconDefault);
 
48
        g_free (myConfig.cIconClose);
 
49
        g_free (myConfig.cIconBroken);
 
50
        g_free (myConfig.cRenderer);
 
51
        g_free (myConfig.cDateFormat);
 
52
CD_APPLET_RESET_CONFIG_END
 
53
 
 
54
 
 
55
CD_APPLET_RESET_DATA_BEGIN
 
56
        cairo_dock_free_task (myData.pTask);
 
57
        cairo_surface_destroy (myData.pSurfaceDefault);
 
58
        cairo_surface_destroy (myData.pSurfaceNote);
 
59
        
 
60
        free_all_notes ();
 
61
        g_hash_table_destroy (myData.hNoteTable);
 
62
        
 
63
        CD_APPLET_DESTROY_MY_SUBDOCK;
 
64
CD_APPLET_RESET_DATA_END