aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-11-19 09:39:19 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-11-19 09:39:19 +0800
commitb06cdfab92313ca7b1ce9a88ccb0ffba33cb17ab (patch)
tree854d94e177216f4f6f2b2e9f2c150b7ec5d32e3d /shell/e-shell.c
parentc3471bfaaad0a94b6f05b678c1eacbc55e72e2dc (diff)
downloadgsoc2013-evolution-b06cdfab92313ca7b1ce9a88ccb0ffba33cb17ab.tar
gsoc2013-evolution-b06cdfab92313ca7b1ce9a88ccb0ffba33cb17ab.tar.gz
gsoc2013-evolution-b06cdfab92313ca7b1ce9a88ccb0ffba33cb17ab.tar.bz2
gsoc2013-evolution-b06cdfab92313ca7b1ce9a88ccb0ffba33cb17ab.tar.lz
gsoc2013-evolution-b06cdfab92313ca7b1ce9a88ccb0ffba33cb17ab.tar.xz
gsoc2013-evolution-b06cdfab92313ca7b1ce9a88ccb0ffba33cb17ab.tar.zst
gsoc2013-evolution-b06cdfab92313ca7b1ce9a88ccb0ffba33cb17ab.zip
Progress update:
- Tighter integration of GalViewInstance and EShellView. - EBinding. Stolen from ExoBinding. Lets you bind GObject properties together to automatically keep their values in sync. This is a godsend. Added to e-util, but might even deserve a place in libedataserver. - EShellSettings. This is the concept I blogged about. Already started ripping apart em-mailer-prefs.c. Others to follow. Any place where we're monitoring GConf keys is a target. - Incremental progress on the calender and mailer. Got EMFolderView somewhat working, but I think I'll be killing off EMFolderBrowser. svn path=/branches/kill-bonobo/; revision=36795
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r--shell/e-shell.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index d6884b0a69..1840571767 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -37,6 +37,7 @@
struct _EShellPrivate {
GList *active_windows;
+ EShellSettings *settings;
EShellLineStatus line_status;
/* Shell Modules */
@@ -50,7 +51,8 @@ struct _EShellPrivate {
enum {
PROP_0,
- PROP_ONLINE_MODE
+ PROP_ONLINE_MODE,
+ PROP_SETTINGS
};
enum {
@@ -261,6 +263,12 @@ shell_get_property (GObject *object,
value, e_shell_get_online_mode (
E_SHELL (object)));
return;
+
+ case PROP_SETTINGS:
+ g_value_set_object (
+ value, e_shell_get_settings (
+ E_SHELL (object)));
+ return;
}
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
@@ -273,6 +281,11 @@ shell_dispose (GObject *object)
priv = E_SHELL_GET_PRIVATE (object);
+ if (priv->settings != NULL) {
+ g_object_unref (priv->settings);
+ priv->settings = NULL;
+ }
+
g_list_foreach (
priv->loaded_modules,
(GFunc) g_type_module_unuse, NULL);
@@ -358,6 +371,16 @@ shell_class_init (EShellClass *class)
G_PARAM_READWRITE |
G_PARAM_CONSTRUCT));
+ g_object_class_install_property (
+ object_class,
+ PROP_SETTINGS,
+ g_param_spec_object (
+ "settings",
+ _("Settings"),
+ _("Application settings"),
+ E_TYPE_SHELL_SETTINGS,
+ G_PARAM_READABLE));
+
signals[EVENT] = g_signal_new (
"event",
G_OBJECT_CLASS_TYPE (object_class),
@@ -415,6 +438,7 @@ shell_init (EShell *shell)
modules_by_name = g_hash_table_new (g_str_hash, g_str_equal);
modules_by_scheme = g_hash_table_new (g_str_hash, g_str_equal);
+ shell->priv->settings = g_object_new (E_TYPE_SHELL_SETTINGS, NULL);
shell->priv->modules_by_name = modules_by_name;
shell->priv->modules_by_scheme = modules_by_scheme;
shell->priv->safe_mode = e_file_lock_exists ();
@@ -517,6 +541,14 @@ e_shell_get_module_by_scheme (EShell *shell,
return g_hash_table_lookup (hash_table, scheme);
}
+EShellSettings *
+e_shell_get_settings (EShell *shell)
+{
+ g_return_val_if_fail (E_IS_SHELL (shell), NULL);
+
+ return shell->priv->settings;
+}
+
GtkWidget *
e_shell_create_window (EShell *shell)
{