aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/task-editor.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-08-30 13:37:36 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-08-30 13:40:49 +0800
commitcfb9c32b6657165e4d5e11aa7b47804f679a61f8 (patch)
tree1f9c8954df7a357b5dc20a13ac82bf31c1112083 /calendar/gui/dialogs/task-editor.c
parentfefeb30f58447f2fa7bcbee16dbe68a9333ce89d (diff)
parent0f7f4cfe38b3c4cd83efbe9922ae15c5aee00317 (diff)
downloadgsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.gz
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.bz2
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.lz
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.xz
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.tar.zst
gsoc2013-evolution-cfb9c32b6657165e4d5e11aa7b47804f679a61f8.zip
Merge commit 'origin/kill-bonobo'
Diffstat (limited to 'calendar/gui/dialogs/task-editor.c')
-rw-r--r--calendar/gui/dialogs/task-editor.c60
1 files changed, 40 insertions, 20 deletions
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 0ca6ff5a3d..edd54859d6 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -33,9 +33,9 @@
#include <glade/glade.h>
#include <glib/gi18n.h>
-#include <e-util/e-plugin-ui.h>
-#include <e-util/e-util-private.h>
-#include <evolution-shell-component-utils.h>
+#include "e-util/e-binding.h"
+#include "e-util/e-plugin-ui.h"
+#include "e-util/e-util-private.h"
#include "task-page.h"
#include "task-details-page.h"
@@ -127,15 +127,6 @@ static GtkActionEntry assigned_task_entries[] = {
};
static void
-task_editor_client_changed_cb (TaskEditor *te)
-{
- ECal *client;
-
- client = comp_editor_get_client (COMP_EDITOR (te));
- e_meeting_store_set_e_cal (te->priv->model, client);
-}
-
-static void
task_editor_model_changed_cb (TaskEditor *te)
{
if (!te->priv->updating) {
@@ -209,6 +200,31 @@ task_editor_dispose (GObject *object)
}
static void
+task_editor_constructed (GObject *object)
+{
+ TaskEditorPrivate *priv;
+ EShellSettings *shell_settings;
+ EShell *shell;
+
+ priv = TASK_EDITOR_GET_PRIVATE (object);
+
+ shell = comp_editor_get_shell (COMP_EDITOR (object));
+ shell_settings = e_shell_get_shell_settings (shell);
+
+ e_binding_new (
+ G_OBJECT (object), "client",
+ G_OBJECT (priv->model), "client");
+
+ e_binding_new (
+ G_OBJECT (shell_settings), "cal-free-busy-template",
+ G_OBJECT (priv->model), "free-busy-template");
+
+ e_binding_new (
+ G_OBJECT (shell_settings), "cal-timezone",
+ G_OBJECT (priv->model), "timezone");
+}
+
+static void
task_editor_show_categories (CompEditor *editor,
gboolean visible)
{
@@ -285,6 +301,7 @@ task_editor_class_init (TaskEditorClass *class)
object_class = G_OBJECT_CLASS (class);
object_class->constructor = task_editor_constructor;
object_class->dispose = task_editor_dispose;
+ object_class->constructed = task_editor_constructed;
editor_class = COMP_EDITOR_CLASS (class);
editor_class->help_section = "usage-calendar-todo";
@@ -304,6 +321,7 @@ task_editor_init (TaskEditor *te)
CompEditor *editor = COMP_EDITOR (te);
GtkUIManager *ui_manager;
GtkActionGroup *action_group;
+ const gchar *id;
GError *error = NULL;
te->priv = TASK_EDITOR_GET_PRIVATE (te);
@@ -346,17 +364,16 @@ task_editor_init (TaskEditor *te)
ui_manager = comp_editor_get_ui_manager (editor);
gtk_ui_manager_add_ui_from_string (ui_manager, ui, -1, &error);
- e_plugin_ui_register_manager ("task-editor", ui_manager, te);
+
+ id = "org.gnome.evolution.task-editor";
+ e_plugin_ui_register_manager (ui_manager, id, te);
+ e_plugin_ui_enable_manager (ui_manager, id);
if (error != NULL) {
g_critical ("%s: %s", G_STRFUNC, error->message);
g_error_free (error);
}
- g_signal_connect (
- te, "notify::client",
- G_CALLBACK (task_editor_client_changed_cb), NULL);
-
g_signal_connect_swapped (
te->priv->model, "row_changed",
G_CALLBACK (task_editor_model_changed_cb), te);
@@ -462,7 +479,7 @@ task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gbool
ECal *client;
gboolean result;
- client = e_meeting_store_get_e_cal (priv->model);
+ client = e_meeting_store_get_client (priv->model);
result = itip_send_comp (E_CAL_COMPONENT_METHOD_CANCEL, comp,
client, NULL, NULL, NULL, strip_alarms, FALSE);
g_object_unref (comp);
@@ -488,13 +505,16 @@ task_editor_send_comp (CompEditor *editor, ECalComponentItipMethod method, gbool
* editor could not be created.
**/
CompEditor *
-task_editor_new (ECal *client, CompEditorFlags flags)
+task_editor_new (ECal *client,
+ EShell *shell,
+ CompEditorFlags flags)
{
g_return_val_if_fail (E_IS_CAL (client), NULL);
+ g_return_val_if_fail (E_IS_SHELL (shell), NULL);
return g_object_new (
TYPE_TASK_EDITOR,
- "flags", flags, "client", client, NULL);
+ "client", client, "flags", flags, "shell", shell, NULL);
}
void