* all:
authorDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Thu, 18 Jan 2007 15:29:49 +0000 (15:29 +0000)
committerDirk-Jan C. Binnema <dirk-jan.binnema@nokia.com>
Thu, 18 Jan 2007 15:29:49 +0000 (15:29 +0000)
  - modest global #defines to modest-defs.h

pmo-trunk-r663

src/modest-account-keys.h [deleted file]
src/modest-account-mgr.c
src/modest-conf-keys.h [deleted file]
src/modest-conf.h
src/modest-init.c
src/modest-local-folder-info.c
src/modest-local-folder-info.h
src/modest-tny-account-store.c
src/modest-tny-account-store.h

diff --git a/src/modest-account-keys.h b/src/modest-account-keys.h
deleted file mode 100644 (file)
index ed9d301..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Copyright (c) 2006, Nokia Corporation
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * * Neither the name of the Nokia Corporation nor the names of its
- *   contributors may be used to endorse or promote products derived from
- *   this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#ifndef __MODEST_ACCOUNT_KEYS_H__
-#define __MODEST_ACCOUNT_KEYS_H__
-
-#include "modest-conf-keys.h"
-
-#define MODEST_CONF_DEFAULT_ACCOUNT      "/default_account"
-
-
-/* configuration key definitions for modest */
-#define MODEST_ACCOUNT_NAMESPACE         MODEST_CONF_NAMESPACE "/" "accounts"
-#define MODEST_SERVER_ACCOUNT_NAMESPACE  MODEST_CONF_NAMESPACE "/" "server_accounts"
-#define MODEST_CONF_REPLY_TYPE           "reply_type"        /*  int  */
-#define MODEST_CONF_FORWARD_TYPE         "forward_type"      /*  int  */
-
-/* per-account data */
-#define MODEST_ACCOUNT_DISPLAY_NAME      "display_name"      /* string */
-#define MODEST_ACCOUNT_STORE_ACCOUNT     "store_account"     /* string */
-#define MODEST_ACCOUNT_TRANSPORT_ACCOUNT "transport_account" /* string */
-#define MODEST_ACCOUNT_FULLNAME                 "fullname"
-#define MODEST_ACCOUNT_EMAIL             "email"
-
-/* server account keys */
-#define MODEST_ACCOUNT_PASSWORD          "password"          /* string */
-#define MDOEST_ACCOUNT_REMEMBER_PWD     "remember_pwd"      /* boolean */
-#define MODEST_ACCOUNT_HOSTNAME          "hostname"          /* string */
-#define MODEST_ACCOUNT_USERNAME          "username"          /* string */
-#define MODEST_ACCOUNT_PROTO             "proto"             /* string */
-#define MODEST_ACCOUNT_ENABLED          "enabled"           /* boolean */
-#define MODEST_ACCOUNT_TYPE             "type"              /* string */
-
-#define MODEST_ACCOUNT_LEAVE_ON_SERVER   "leave_on_server"   /* boolean */
-#define MODEST_ACCOUNT_PREFERRED_CNX     "preferred_cnx"     /* string */
-#define MODEST_ACCOUNT_OPTIONS          "options"           /* list */
-
-#endif /*__MODEST_CONF_KEYS_H__*/
index c08dbb6..77deee5 100644 (file)
@@ -29,7 +29,6 @@
 
 #include <string.h>
 #include "modest-marshal.h"
 
 #include <string.h>
 #include "modest-marshal.h"
-#include "modest-account-keys.h"
 #include "modest-account-mgr.h"
 
 /* 'private'/'protected' functions */
 #include "modest-account-mgr.h"
 
 /* 'private'/'protected' functions */
diff --git a/src/modest-conf-keys.h b/src/modest-conf-keys.h
deleted file mode 100644 (file)
index 98c90e4..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-/* Copyright (c) 2006, Nokia Corporation
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- *   notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- *   notice, this list of conditions and the following disclaimer in the
- *   documentation and/or other materials provided with the distribution.
- * * Neither the name of the Nokia Corporation nor the names of its
- *   contributors may be used to endorse or promote products derived from
- *   this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
- * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
- * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-#ifndef __MODEST_CONF_KEYS_H__
-#define __MODEST_CONF_KEYS_H__
-
-/* configuration key definitions for modest */
-#define MODEST_CONF_NAMESPACE          "/apps/modest"
-
-/* place for widget settings */
-#define MODEST_CONF_WIDGET_NAMESPACE     MODEST_CONF_NAMESPACE "/widgets"
-
-
-
-/*
- * the widget settings below are obsolete
- */
-
-
-/*
- * the main window
- */
-#define MODEST_MAIN_WINDOW_HEIGHT                       MODEST_CONF_NAMESPACE "/main_window_height"     /* int */
-#define MODEST_MAIN_WINDOW_HEIGHT_DEFAULT                480                                             /* int */
-
-#define MODEST_MAIN_WINDOW_WIDTH                        MODEST_CONF_NAMESPACE "/main_window_width"      /* int */
-#define MODEST_MAIN_WINDOW_WIDTH_DEFAULT                 800
-
-
-
-/*
- * the next 5 parameters determine the window size
- */
-#define MODEST_MAIN_PANED_HEIGHT                       MODEST_CONF_NAMESPACE "/main_paned_height"
-#define MODEST_MAIN_PANED_HEIGHT_DEFAULT               600
-
-/* the folders / favorites (on the left) */
-#define MODEST_FOLDER_PANED_WIDTH                       MODEST_CONF_NAMESPACE "/folder_paned_width"
-#define MODEST_FOLDER_PANED_WIDTH_DEFAULT               150
-/* percentage the of the height of the favorites folders */
-#define MODEST_FOLDER_PANED_DIVIDER_POS                         MODEST_CONF_NAMESPACE "/folder_paned_divider_pos"
-#define MODEST_FOLDER_PANED_DIVIDER_POS_DEFAULT                 100
-
-/* the messages / headers (on the right) */
-#define MODEST_MSG_PANED_WIDTH                          MODEST_CONF_NAMESPACE "/msg_paned_width"
-#define MODEST_MSG_PANED_WIDTH_DEFAULT                  600
-
-/* percentage the of the height of the headers */
-#define MODEST_MSG_PANED_DIVIDER_POS                     MODEST_CONF_NAMESPACE "/msg_paned_divider_pos"
-#define MODEST_MSG_PANED_DIVIDER_POS_DEFAULT            40
-
-
-
-
-
-
-/*
- * the account view window
- */
-#define MODEST_ACCOUNT_VIEW_WINDOW_HEIGHT_DEFAULT       500
-#define MODEST_ACCOUNT_VIEW_WINDOW_WIDTH_DEFAULT        300
-
-
-#define MODEST_EDIT_WINDOW_HEIGHT        MODEST_CONF_NAMESPACE "/edit_window_height"    /* int */
-#define MODEST_EDIT_WINDOW_HEIGHT_DEFAULT 480                                             /* int */
-
-#define MODEST_EDIT_WINDOW_WIDTH         MODEST_CONF_NAMESPACE "/edit_window_width"     /* int */
-#define MODEST_EDIT_WINDOW_WIDTH_DEFAULT  800
-
-#define MODEST_MSG_VIEW_NAMESPACE    MODEST_NAMESPACE "/view"
-
-#define MODEST_MSG_VIEW_SHOW_ATTACHMENTS_INLINE MODEST_MSG_VIEW_NAMESPACE "/show_attachments_inline" /* boolean */
-
-
-#endif /*__MODEST_CONF_KEYS_H__*/
index 33643e2..699a74d 100644 (file)
@@ -31,7 +31,7 @@
 #define __MODEST_CONF_H__
 
 #include <glib-object.h>
 #define __MODEST_CONF_H__
 
 #include <glib-object.h>
-#include "modest-conf-keys.h"
+#include "modest-defs.h"
 
 G_BEGIN_DECLS
 
 
 G_BEGIN_DECLS
 
index 908142a..ed8048b 100644 (file)
@@ -28,6 +28,7 @@
  */
 
 #include <config.h>
  */
 
 #include <config.h>
+#include <modest-defs.h>
 #include <widgets/modest-header-view.h>
 #include <widgets/modest-folder-view.h>
 #include <modest-tny-platform-factory.h>
 #include <widgets/modest-header-view.h>
 #include <widgets/modest-folder-view.h>
 #include <modest-tny-platform-factory.h>
index 1c89200..2c1ca5e 100644 (file)
@@ -93,7 +93,9 @@ modest_local_folder_info_get_type_display_name (ModestLocalFolderType type)
 gchar *
 modest_local_folder_info_get_maildir_path (void)
 {
 gchar *
 modest_local_folder_info_get_maildir_path (void)
 {
-       return g_build_filename (g_get_home_dir(), ".modest",
-                                "local_folders", NULL);
+       return g_build_filename (g_get_home_dir(),
+                                MODEST_DIR,
+                                MODEST_LOCAL_FOLDERS_MAILDIR, 
+                                NULL);
 }
 
 }
 
index 8e2937d..42fe037 100644 (file)
@@ -33,6 +33,7 @@
 G_BEGIN_DECLS
 
 #include <glib.h>
 G_BEGIN_DECLS
 
 #include <glib.h>
+#include <modest-defs.h>
 
 typedef enum {
        MODEST_LOCAL_FOLDER_TYPE_UNKNOWN,
 
 typedef enum {
        MODEST_LOCAL_FOLDER_TYPE_UNKNOWN,
index 593298a..a3d588f 100644 (file)
@@ -579,11 +579,6 @@ modest_tny_account_store_get_accounts  (TnyAccountStore *iface, TnyList *list,
        tny_session_camel_set_account_store (priv->tny_session_camel, iface);
 }
 
        tny_session_camel_set_account_store (priv->tny_session_camel, iface);
 }
 
-
-/*
- * the cache dir will be ~/.modest/cache
- * might want to change this in a simple #define...
- */
 static const gchar*
 modest_tny_account_store_get_cache_dir (TnyAccountStore *self)
 {
 static const gchar*
 modest_tny_account_store_get_cache_dir (TnyAccountStore *self)
 {
@@ -591,7 +586,9 @@ modest_tny_account_store_get_cache_dir (TnyAccountStore *self)
        priv = MODEST_TNY_ACCOUNT_STORE_GET_PRIVATE(self);
        
        if (!priv->cache_dir)
        priv = MODEST_TNY_ACCOUNT_STORE_GET_PRIVATE(self);
        
        if (!priv->cache_dir)
-               priv->cache_dir = g_build_filename (g_get_home_dir(), ".modest",
+               priv->cache_dir = g_build_filename (g_get_home_dir(), 
+                                                   MODEST_DIR,
+                                                   MODEST_CACHE_DIR,
                                                    "cache", NULL);
        return priv->cache_dir;
 }
                                                    "cache", NULL);
        return priv->cache_dir;
 }
index 81ffa97..aa29ea8 100644 (file)
@@ -34,6 +34,7 @@
 #define __MODEST_TNY_ACCOUNT_STORE_H__
 
 #include <glib-object.h>
 #define __MODEST_TNY_ACCOUNT_STORE_H__
 
 #include <glib-object.h>
+#include <modest-defs.h>
 #include <tny-account-store.h>
 #include <tny-session-camel.h>
 #include <tny-shared.h>
 #include <tny-account-store.h>
 #include <tny-session-camel.h>
 #include <tny-shared.h>