aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/tasks-control.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2004-05-12 03:29:04 +0800
committerDan Winship <danw@src.gnome.org>2004-05-12 03:29:04 +0800
commit1b15216f5e285a231bcf5c7165be88607642c259 (patch)
treebbaf70b91a5f8ea5293bf870fe82b19d16971231 /calendar/gui/tasks-control.c
parent7f8c30cebcdfd7f63674be90cab467bd6a7495d7 (diff)
downloadgsoc2013-evolution-1b15216f5e285a231bcf5c7165be88607642c259.tar.gz
gsoc2013-evolution-1b15216f5e285a231bcf5c7165be88607642c259.tar.zst
gsoc2013-evolution-1b15216f5e285a231bcf5c7165be88607642c259.zip
Remove the calendar and task list controls
* gui/GNOME_Evolution_Calendar.server.in.in: Remove the calendar and task list controls * gui/main.c (factory): Remove support for the calendar and task list controls * gui/control-factory.c: Remove the property-bag stuff * gui/tasks-control.c: Likewise svn path=/trunk/; revision=25857
Diffstat (limited to 'calendar/gui/tasks-control.c')
-rw-r--r--calendar/gui/tasks-control.c111
1 files changed, 0 insertions, 111 deletions
diff --git a/calendar/gui/tasks-control.c b/calendar/gui/tasks-control.c
index 9e0d3fe286..f596aa8a07 100644
--- a/calendar/gui/tasks-control.c
+++ b/calendar/gui/tasks-control.c
@@ -39,7 +39,6 @@
#include <libgnomeprintui/gnome-print-preview.h>
#include <libgnomeprintui/gnome-print-dialog.h>
#include <bonobo/bonobo-control.h>
-#include <bonobo/bonobo-property-bag.h>
#include <bonobo/bonobo-ui-util.h>
#include <gal/widgets/e-gui-utils.h>
#include <e-util/e-dialog-utils.h>
@@ -52,23 +51,9 @@
#include "tasks-control.h"
#include "evolution-shell-component-utils.h"
-#define TASKS_CONTROL_PROPERTY_URI "folder_uri"
-#define TASKS_CONTROL_PROPERTY_URI_IDX 1
#define FIXED_MARGIN .05
-static void tasks_control_properties_init (BonoboControl *control,
- ETasks *tasks);
-static void tasks_control_get_property (BonoboPropertyBag *bag,
- BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data);
-static void tasks_control_set_property (BonoboPropertyBag *bag,
- const BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data);
static void tasks_control_activate_cb (BonoboControl *control,
gboolean activate,
gpointer user_data);
@@ -125,108 +110,12 @@ tasks_control_new (void)
return NULL;
}
- tasks_control_properties_init (control, E_TASKS (tasks));
-
g_signal_connect (control, "activate", G_CALLBACK (tasks_control_activate_cb), tasks);
return control;
}
-/* Creates the property bag for our new control. */
-static void
-tasks_control_properties_init (BonoboControl *control,
- ETasks *tasks)
-
-{
- BonoboPropertyBag *pbag;
-
- pbag = bonobo_property_bag_new (tasks_control_get_property,
- tasks_control_set_property, tasks);
-
- bonobo_property_bag_add (pbag,
- TASKS_CONTROL_PROPERTY_URI,
- TASKS_CONTROL_PROPERTY_URI_IDX,
- BONOBO_ARG_STRING,
- NULL,
- _("The URI of the tasks folder to display"),
- 0);
-
- bonobo_control_set_properties (control, bonobo_object_corba_objref (BONOBO_OBJECT (pbag)), NULL);
- bonobo_object_unref (BONOBO_OBJECT (pbag));
-}
-
-
-/* Gets a property of our control. FIXME: Finish. */
-static void
-tasks_control_get_property (BonoboPropertyBag *bag,
- BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- ETasks *tasks = user_data;
- const char *uri;
- ECalModel *model;
-
- switch (arg_id) {
-
- case TASKS_CONTROL_PROPERTY_URI_IDX:
- model = e_calendar_table_get_model (e_tasks_get_calendar_table (tasks));
- uri = e_cal_get_uri (e_cal_model_get_default_client (model));
- BONOBO_ARG_SET_STRING (arg, uri);
- break;
-
- default:
- g_warning ("Unhandled arg %d\n", arg_id);
- }
-}
-
-
-static void
-tasks_control_set_property (BonoboPropertyBag *bag,
- const BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- ETasks *tasks = user_data;
- char *uri;
- ESource *source;
- ESourceGroup *group;
-
- switch (arg_id) {
-
- case TASKS_CONTROL_PROPERTY_URI_IDX:
- /* FIXME Remove the old uri? */
- uri = BONOBO_ARG_GET_STRING (arg);
-
- group = e_source_group_new ("", uri);
- source = e_source_new ("", "");
- e_source_set_group (source, group);
-
- if (!e_tasks_add_todo_source (tasks, source)) {
- char *msg;
-
- msg = g_strdup_printf (_("Could not load the tasks in `%s'"), uri);
- gnome_error_dialog_parented (
- msg,
- GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (tasks))));
- g_free (msg);
- }
-
- g_object_unref (source);
- g_object_unref (group);
-
- break;
-
- default:
- g_warning ("Unhandled arg %d\n", arg_id);
- break;
- }
-}
-
-
static void
tasks_control_activate_cb (BonoboControl *control,
gboolean activate,