diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2009-02-13 03:01:33 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2009-02-13 03:01:33 +0800 |
commit | f4d9a26f99304d0fed83289bb6411e3a14a01ef7 (patch) | |
tree | 0671bd5d51968fd9c49e927053947123bf1234c8 /shell | |
parent | 6bffa31112ca78585f3528bbd2ad52b84231e3f4 (diff) | |
download | gsoc2013-evolution-f4d9a26f99304d0fed83289bb6411e3a14a01ef7.tar gsoc2013-evolution-f4d9a26f99304d0fed83289bb6411e3a14a01ef7.tar.gz gsoc2013-evolution-f4d9a26f99304d0fed83289bb6411e3a14a01ef7.tar.bz2 gsoc2013-evolution-f4d9a26f99304d0fed83289bb6411e3a14a01ef7.tar.lz gsoc2013-evolution-f4d9a26f99304d0fed83289bb6411e3a14a01ef7.tar.xz gsoc2013-evolution-f4d9a26f99304d0fed83289bb6411e3a14a01ef7.tar.zst gsoc2013-evolution-f4d9a26f99304d0fed83289bb6411e3a14a01ef7.zip |
Make MailSession available through EShellSettings so composer can use it.
svn path=/branches/kill-bonobo/; revision=37257
Diffstat (limited to 'shell')
-rw-r--r-- | shell/e-shell-settings.c | 57 | ||||
-rw-r--r-- | shell/e-shell-settings.h | 5 |
2 files changed, 62 insertions, 0 deletions
diff --git a/shell/e-shell-settings.c b/shell/e-shell-settings.c index d887f39e6a..23dd866bf8 100644 --- a/shell/e-shell-settings.c +++ b/shell/e-shell-settings.c @@ -500,3 +500,60 @@ e_shell_settings_set_object (EShellSettings *shell_settings, g_object_set_property (object, property_name, &value); g_value_unset (&value); } + +/** + * e_shell_settings_get_pointer: + * @shell_settings: an #EShellSettings + * @property_name: an installed property name + * + * Returns the contents of an #EShellSettings property of type + * #G_TYPE_POINTER. + * + * Returns: pointer contents of @property_name + **/ +gpointer +e_shell_settings_get_pointer (EShellSettings *shell_settings, + const gchar *property_name) +{ + GObject *object; + GValue value = { 0, }; + gpointer v_pointer; + + g_return_val_if_fail (E_IS_SHELL_SETTINGS (shell_settings), NULL); + g_return_val_if_fail (property_name != NULL, NULL); + + object = G_OBJECT (shell_settings); + g_value_init (&value, G_TYPE_POINTER); + g_object_get_property (object, property_name, &value); + v_pointer = g_value_get_pointer (&value); + g_value_unset (&value); + + return v_pointer; +} + +/** + * e_shell_settings_set_pointer: + * @shell_settings: an #EShellSettings + * @property_name: an installed property name + * @v_pointer: pointer to be set + * + * Sets the contents of an #EShellSettings property of type #G_TYPE_POINTER + * to @v_pointer. + **/ +void +e_shell_settings_set_pointer (EShellSettings *shell_settings, + const gchar *property_name, + gpointer v_pointer) +{ + GObject *object; + GValue value = { 0, }; + + g_return_if_fail (E_IS_SHELL_SETTINGS (shell_settings)); + g_return_if_fail (property_name != NULL); + + object = G_OBJECT (shell_settings); + g_value_init (&value, G_TYPE_POINTER); + g_value_set_pointer (&value, v_pointer); + g_object_set_property (object, property_name, &value); + g_value_unset (&value); +} diff --git a/shell/e-shell-settings.h b/shell/e-shell-settings.h index fb53d800d4..a9f6a20f93 100644 --- a/shell/e-shell-settings.h +++ b/shell/e-shell-settings.h @@ -103,6 +103,11 @@ gpointer e_shell_settings_get_object (EShellSettings *shell_settings, void e_shell_settings_set_object (EShellSettings *shell_settings, const gchar *property_name, gpointer v_object); +gpointer e_shell_settings_get_pointer (EShellSettings *shell_setting, + const gchar *property_name); +void e_shell_settings_set_pointer (EShellSettings *shell_setting, + const gchar *property_name, + gpointer v_pointer); G_END_DECLS |