aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-shell.c')
-rw-r--r--shell/e-shell.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/shell/e-shell.c b/shell/e-shell.c
index a9c2fdc22f..740bec8306 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -46,10 +46,6 @@
#include "e-shell-window.h"
#include "e-shell-utils.h"
-#define E_SHELL_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_SHELL, EShellPrivate))
-
struct _EShellPrivate {
GQueue alerts;
EShellSettings *settings;
@@ -697,7 +693,13 @@ shell_dispose (GObject *object)
EShellPrivate *priv;
EAlert *alert;
- priv = E_SHELL_GET_PRIVATE (object);
+ priv = E_SHELL (object)->priv;
+
+ while ((alert = g_queue_pop_head (&priv->alerts)) != NULL) {
+ g_signal_handlers_disconnect_by_func (
+ alert, shell_alert_response_cb, object);
+ g_object_unref (alert);
+ }
while ((alert = g_queue_pop_head (&priv->alerts)) != NULL) {
g_signal_handlers_disconnect_by_func (
@@ -745,7 +747,7 @@ shell_finalize (GObject *object)
{
EShellPrivate *priv;
- priv = E_SHELL_GET_PRIVATE (object);
+ priv = E_SHELL (object)->priv;
g_hash_table_destroy (priv->backends_by_name);
g_hash_table_destroy (priv->backends_by_scheme);
@@ -1160,7 +1162,8 @@ e_shell_init (EShell *shell)
GtkIconTheme *icon_theme;
EggSMClient *sm_client;
- shell->priv = E_SHELL_GET_PRIVATE (shell);
+ shell->priv = G_TYPE_INSTANCE_GET_PRIVATE (
+ shell, E_TYPE_SHELL, EShellPrivate);
backends_by_name = g_hash_table_new (g_str_hash, g_str_equal);
backends_by_scheme = g_hash_table_new (g_str_hash, g_str_equal);
@@ -1427,18 +1430,13 @@ e_shell_create_shell_window (EShell *shell,
/* EShellWindow initializes its active view from a GConf key,
* so set the key ahead of time to control the intial view. */
if (view_name != NULL) {
- GConfClient *client;
+ GSettings *settings;
const gchar *key;
- GError *error = NULL;
- client = e_shell_get_gconf_client (shell);
- key = "/apps/evolution/shell/view_defaults/component_id";
- gconf_client_set_string (client, key, view_name, &error);
+ settings = g_settings_new ("org.gnome.evolution.shell");
+ g_settings_set_string (settings, "default-component-id", view_name);
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
+ g_object_unref (settings);
}
shell_window = e_shell_window_new (