aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/dialogs/comp-editor.c6
-rw-r--r--calendar/modules/e-cal-shell-module.c19
-rw-r--r--calendar/modules/e-memo-shell-module.c19
-rw-r--r--calendar/modules/e-task-shell-module.c19
4 files changed, 39 insertions, 24 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index e9967eccaf..3e6fc65aad 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -39,6 +39,7 @@
#include <e-util/e-dialog-utils.h>
#include <e-util/e-util-private.h>
#include <e-util/gconf-bridge.h>
+#include <shell/e-shell.h>
#include <camel/camel-url.h>
#include <camel/camel-exception.h>
@@ -1780,6 +1781,7 @@ comp_editor_init (CompEditor *editor)
CompEditorPrivate *priv;
GtkActionGroup *action_group;
GtkAction *action;
+ EShell *shell;
GError *error = NULL;
editor->priv = priv = COMP_EDITOR_GET_PRIVATE (editor);
@@ -1871,6 +1873,10 @@ comp_editor_init (CompEditor *editor)
g_signal_connect(editor, "drag-motion", G_CALLBACK(drag_motion), editor);
gtk_window_set_type_hint (GTK_WINDOW (editor), GDK_WINDOW_TYPE_HINT_NORMAL);
+
+ /* FIXME Shell should be passed in. */
+ shell = e_shell_get_default ();
+ e_shell_watch_window (shell, GTK_WINDOW (editor));
}
static gboolean
diff --git a/calendar/modules/e-cal-shell-module.c b/calendar/modules/e-cal-shell-module.c
index d4fed663be..176b8d04bc 100644
--- a/calendar/modules/e-cal-shell-module.c
+++ b/calendar/modules/e-cal-shell-module.c
@@ -423,27 +423,30 @@ cal_module_init_preferences (void)
}
static gboolean
-cal_module_handle_uri (EShellModule *shell_module,
- const gchar *uri)
+cal_module_handle_uri_cb (EShellModule *shell_module,
+ const gchar *uri)
{
/* FIXME */
return FALSE;
}
static void
-cal_module_window_created (EShellModule *shell_module,
- EShellWindow *shell_window)
+cal_module_window_created_cb (EShellModule *shell_module,
+ GtkWindow *window)
{
const gchar *module_name;
+ if (!E_IS_SHELL_WINDOW (window))
+ return;
+
module_name = G_TYPE_MODULE (shell_module)->name;
e_shell_window_register_new_item_actions (
- shell_window, module_name,
+ E_SHELL_WINDOW (window), module_name,
item_entries, G_N_ELEMENTS (item_entries));
e_shell_window_register_new_source_actions (
- shell_window, module_name,
+ E_SHELL_WINDOW (window), module_name,
source_entries, G_N_ELEMENTS (source_entries));
}
@@ -476,11 +479,11 @@ e_shell_module_init (GTypeModule *type_module)
g_signal_connect_swapped (
shell, "handle-uri",
- G_CALLBACK (cal_module_handle_uri), shell_module);
+ G_CALLBACK (cal_module_handle_uri_cb), shell_module);
g_signal_connect_swapped (
shell, "window-created",
- G_CALLBACK (cal_module_window_created), shell_module);
+ G_CALLBACK (cal_module_window_created_cb), shell_module);
cal_module_init_preferences ();
}
diff --git a/calendar/modules/e-memo-shell-module.c b/calendar/modules/e-memo-shell-module.c
index a82a8c5235..5e8f9a53bf 100644
--- a/calendar/modules/e-memo-shell-module.c
+++ b/calendar/modules/e-memo-shell-module.c
@@ -306,8 +306,8 @@ static GtkActionEntry source_entries[] = {
};
static gboolean
-memo_module_handle_uri (EShellModule *shell_module,
- const gchar *uri)
+memo_module_handle_uri_cb (EShellModule *shell_module,
+ const gchar *uri)
{
CompEditor *editor;
CompEditorFlags flags = 0;
@@ -443,19 +443,22 @@ exit:
}
static void
-memo_module_window_created (EShellModule *shell_module,
- EShellWindow *shell_window)
+memo_module_window_created_cb (EShellModule *shell_module,
+ GtkWindow *window)
{
const gchar *module_name;
+ if (!E_IS_SHELL_WINDOW (window))
+ return;
+
module_name = G_TYPE_MODULE (shell_module)->name;
e_shell_window_register_new_item_actions (
- shell_window, module_name,
+ E_SHELL_WINDOW (window), module_name,
item_entries, G_N_ELEMENTS (item_entries));
e_shell_window_register_new_source_actions (
- shell_window, module_name,
+ E_SHELL_WINDOW (window), module_name,
source_entries, G_N_ELEMENTS (source_entries));
}
@@ -488,9 +491,9 @@ e_shell_module_init (GTypeModule *type_module)
g_signal_connect_swapped (
shell, "handle-uri",
- G_CALLBACK (memo_module_handle_uri), shell_module);
+ G_CALLBACK (memo_module_handle_uri_cb), shell_module);
g_signal_connect_swapped (
shell, "window-created",
- G_CALLBACK (memo_module_window_created), shell_module);
+ G_CALLBACK (memo_module_window_created_cb), shell_module);
}
diff --git a/calendar/modules/e-task-shell-module.c b/calendar/modules/e-task-shell-module.c
index 80cfc0a61a..76db5b056b 100644
--- a/calendar/modules/e-task-shell-module.c
+++ b/calendar/modules/e-task-shell-module.c
@@ -306,8 +306,8 @@ static GtkActionEntry source_entries[] = {
};
static gboolean
-task_module_handle_uri (EShellModule *shell_module,
- const gchar *uri)
+task_module_handle_uri_cb (EShellModule *shell_module,
+ const gchar *uri)
{
CompEditor *editor;
CompEditorFlags flags = 0;
@@ -449,19 +449,22 @@ exit:
}
static void
-task_module_window_created (EShellModule *shell_module,
- EShellWindow *shell_window)
+task_module_window_created_cb (EShellModule *shell_module,
+ GtkWindow *window)
{
const gchar *module_name;
+ if (!E_IS_SHELL_WINDOW (window))
+ return;
+
module_name = G_TYPE_MODULE (shell_module)->name;
e_shell_window_register_new_item_actions (
- shell_window, module_name,
+ E_SHELL_WINDOW (window), module_name,
item_entries, G_N_ELEMENTS (item_entries));
e_shell_window_register_new_source_actions (
- shell_window, module_name,
+ E_SHELL_WINDOW (window), module_name,
source_entries, G_N_ELEMENTS (source_entries));
}
@@ -494,9 +497,9 @@ e_shell_module_init (GTypeModule *type_module)
g_signal_connect_swapped (
shell, "handle-uri",
- G_CALLBACK (task_module_handle_uri), shell_module);
+ G_CALLBACK (task_module_handle_uri_cb), shell_module);
g_signal_connect_swapped (
shell, "window-created",
- G_CALLBACK (task_module_window_created), shell_module);
+ G_CALLBACK (task_module_window_created_cb), shell_module);
}