aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-09-11 22:44:18 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-09-11 22:44:18 +0800
commit4c8aa5982c0132716f473873d0e1d7601df14607 (patch)
tree1e9cc771988082b22f72bbb3a4fa0dc9bb84184e /shell
parent6545899a2972546a035da4d73c3625b9e8bb7438 (diff)
downloadgsoc2013-evolution-4c8aa5982c0132716f473873d0e1d7601df14607.tar.gz
gsoc2013-evolution-4c8aa5982c0132716f473873d0e1d7601df14607.tar.zst
gsoc2013-evolution-4c8aa5982c0132716f473873d0e1d7601df14607.zip
Add popup menu stubs for calendars, tasks and memos.
svn path=/branches/kill-bonobo/; revision=36303
Diffstat (limited to 'shell')
-rw-r--r--shell/e-shell-module.c26
-rw-r--r--shell/e-shell-module.h1
2 files changed, 27 insertions, 0 deletions
diff --git a/shell/e-shell-module.c b/shell/e-shell-module.c
index 75dbc3756f..6d6849ee29 100644
--- a/shell/e-shell-module.c
+++ b/shell/e-shell-module.c
@@ -20,6 +20,7 @@
#include "e-shell-module.h"
+#include <errno.h>
#include <gmodule.h>
#include <glib/gi18n.h>
#include <e-util/e-util.h>
@@ -41,6 +42,7 @@ struct _EShellModulePrivate {
gchar *filename;
EShell *shell;
+ gchar *config_dir;
gchar *data_dir;
/* Initializes the loaded type module. */
@@ -287,6 +289,15 @@ e_shell_module_compare (EShellModule *shell_module_a,
}
const gchar *
+e_shell_module_get_config_dir (EShellModule *shell_module)
+{
+ g_return_val_if_fail (E_IS_SHELL_MODULE (shell_module), NULL);
+ g_return_val_if_fail (shell_module->priv->config_dir != NULL, NULL);
+
+ return shell_module->priv->config_dir;
+}
+
+const gchar *
e_shell_module_get_data_dir (EShellModule *shell_module)
{
g_return_val_if_fail (E_IS_SHELL_MODULE (shell_module), NULL);
@@ -355,6 +366,7 @@ e_shell_module_set_info (EShellModule *shell_module,
{
GTypeModule *type_module;
EShellModuleInfo *module_info;
+ const gchar *pathname;
g_return_if_fail (E_IS_SHELL_MODULE (shell_module));
g_return_if_fail (info != NULL);
@@ -375,7 +387,21 @@ e_shell_module_set_info (EShellModule *shell_module,
module_info->is_busy = info->is_busy;
module_info->shutdown = info->shutdown;
+ /* Determine the user data directory for this module. */
g_free (shell_module->priv->data_dir);
shell_module->priv->data_dir = g_build_filename (
e_get_user_data_dir (), module_info->name, NULL);
+
+ /* Determine the user configuration directory for this module. */
+ g_free (shell_module->priv->config_dir);
+ shell_module->priv->config_dir = g_build_filename (
+ shell_module->priv->data_dir, "config", NULL);
+
+ /* Create the user configuration directory for this module,
+ * which should also create the user data directory. */
+ pathname = shell_module->priv->config_dir;
+ if (g_mkdir_with_parents (pathname, 0777) != 0)
+ g_critical (
+ "Cannot create directory %s: %s",
+ pathname, g_strerror (errno));
}
diff --git a/shell/e-shell-module.h b/shell/e-shell-module.h
index 7e2722f210..d9baa84a9a 100644
--- a/shell/e-shell-module.h
+++ b/shell/e-shell-module.h
@@ -74,6 +74,7 @@ EShellModule * e_shell_module_new (EShell *shell,
const gchar *filename);
gint e_shell_module_compare (EShellModule *shell_module_a,
EShellModule *shell_module_b);
+const gchar * e_shell_module_get_config_dir (EShellModule *shell_module);
const gchar * e_shell_module_get_data_dir (EShellModule *shell_module);
const gchar * e_shell_module_get_filename (EShellModule *shell_module);
const gchar * e_shell_module_get_searches (EShellModule *shell_module);