[evolution-patches] addr/mail/cal patches for connector ui changes
- From: Dan Winship <danw ximian com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] addr/mail/cal patches for connector ui changes
- Date: Mon, 03 May 2004 11:55:47 -0400
This removes the folder control code, which is no longer needed with the
updated connector ui plan. (Note that the addressbook code currently
leaks and the mailer folder control code doesn't handle the New button
correctly, which is why I think we should actually remove this code.
It's just going to continue getting more and more broken if nothing in
Evolution is using it.)
Index: addressbook/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/ChangeLog,v
retrieving revision 1.1687
diff -u -r1.1687 ChangeLog
--- addressbook/ChangeLog 3 May 2004 14:23:22 -0000 1.1687
+++ addressbook/ChangeLog 3 May 2004 15:51:55 -0000
@@ -1,3 +1,14 @@
+2004-05-03 Dan Winship <danw ximian com>
+
+ * gui/component/GNOME_Evolution_Addressbook.server.in.in: Remove
+ the addressbook control
+
+ * gui/component/component-factory.c (factory): Remove support for
+ the addressbook control
+
+ * gui/component/addressbook-view.c: Remove all the property-bag
+ stuff.
+
2004-05-03 JP Rosevear <jpr ximian com>
* gui/component/GNOME_Evolution_Addressbook.server.in.in: set the
Index: addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in,v
retrieving revision 1.15
diff -u -r1.15 GNOME_Evolution_Addressbook.server.in.in
--- addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in 3 May 2004 14:23:22 -0000 1.15
+++ addressbook/gui/component/GNOME_Evolution_Addressbook.server.in.in 3 May 2004 15:51:55 -0000
@@ -32,20 +32,6 @@
</oaf_server>
-<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_Control:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Addressbook_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:BonoboControl/addressbook-control:@VERSION@"/>
- <item value="IDL:GNOME/Control:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Addressbook folder viewer"/>
-
-</oaf_server>
-
<oaf_server iid="OAFIID:GNOME_Evolution_Addressbook_Component:@VERSION@"
type="factory"
location="OAFIID:GNOME_Evolution_Addressbook_Factory:@VERSION@">
Index: addressbook/gui/component/addressbook-view.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/addressbook-view.c,v
retrieving revision 1.4
diff -u -r1.4 addressbook-view.c
--- addressbook/gui/component/addressbook-view.c 21 Apr 2004 04:13:51 -0000 1.4
+++ addressbook/gui/component/addressbook-view.c 3 May 2004 15:51:55 -0000
@@ -36,7 +36,6 @@
#include <bonobo/bonobo-generic-factory.h>
#include <bonobo/bonobo-ui-util.h>
#include <bonobo/bonobo-exception.h>
-#include <bonobo/bonobo-property-bag.h>
#include <gal/util/e-util.h>
#include "widgets/misc/e-task-bar.h"
@@ -72,12 +71,6 @@
#define d(x)
-#define PROPERTY_SOURCE_UID "source_uid"
-#define PROPERTY_FOLDER_URI "folder_uri"
-
-#define PROPERTY_SOURCE_UID_IDX 1
-#define PROPERTY_FOLDER_URI_IDX 2
-
struct _AddressbookViewPrivate {
GtkWidget *notebook;
BonoboControl *folder_view_control;
@@ -94,7 +87,6 @@
GHashTable *uid_to_view;
EBook *book;
guint activity_id;
- BonoboPropertyBag *properties;
ESourceList *source_list;
char *passwd;
EUserCreatableItemsHandler *creatable_items_handler;
@@ -112,15 +104,12 @@
static void set_status_message (EABView *eav, const char *message, AddressbookView *view);
static void search_result (EABView *eav, EBookViewStatus status, AddressbookView *view);
+static void activate_source (AddressbookView *view, ESource *source);
+
static void addressbook_view_init (AddressbookView *view);
static void addressbook_view_class_init (AddressbookViewClass *klass);
static void addressbook_view_dispose (GObject *object);
-static void set_prop (BonoboPropertyBag *bag, const BonoboArg *arg, guint arg_id,
- CORBA_Environment *ev, gpointer user_data);
-static void get_prop (BonoboPropertyBag *bag, BonoboArg *arg, guint arg_id,
- CORBA_Environment *ev, gpointer user_data);
-
static EABView *
get_current_view (AddressbookView *view)
{
@@ -551,14 +540,12 @@
static void
load_uri_for_selection (ESourceSelector *selector,
- BonoboControl *view_control)
+ AddressbookView *view)
{
ESource *selected_source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (selector));
- if (selected_source != NULL) {
- bonobo_control_set_property (view_control, NULL, "source_uid", TC_CORBA_string,
- e_source_peek_uid (selected_source), NULL);
- }
+ if (selected_source != NULL)
+ activate_source (view, selected_source);
}
static ESource *
@@ -753,7 +740,7 @@
primary_source_selection_changed_callback (ESourceSelector *selector,
AddressbookView *view)
{
- load_uri_for_selection (selector, view->priv->folder_view_control);
+ load_uri_for_selection (selector, view);
save_primary_selection (view);
}
@@ -993,22 +980,6 @@
gtk_widget_show (priv->notebook);
- priv->properties = bonobo_property_bag_new (get_prop, set_prop, view);
-
- bonobo_property_bag_add (priv->properties,
- PROPERTY_SOURCE_UID, PROPERTY_SOURCE_UID_IDX,
- BONOBO_ARG_STRING, NULL,
- _("UID of the contacts source that the view will display"), 0);
-
- bonobo_property_bag_add (priv->properties,
- PROPERTY_FOLDER_URI, PROPERTY_FOLDER_URI_IDX,
- BONOBO_ARG_STRING, NULL,
- _("The URI that the address book will display"), 0);
-
- bonobo_control_set_properties (priv->folder_view_control,
- bonobo_object_corba_objref (BONOBO_OBJECT (priv->properties)),
- NULL);
-
e_book_get_addressbooks (&priv->source_list, NULL);
g_signal_connect (priv->source_list,
"changed",
@@ -1062,7 +1033,7 @@
G_OBJECT (view), 0);
load_primary_selection (view);
- load_uri_for_selection (E_SOURCE_SELECTOR (priv->selector), priv->folder_view_control);
+ load_uri_for_selection (E_SOURCE_SELECTOR (priv->selector), view);
}
static void
@@ -1075,9 +1046,6 @@
if (priv->book)
g_object_unref (priv->book);
- if (priv->properties)
- bonobo_object_unref (BONOBO_OBJECT(priv->properties));
-
g_free(priv->passwd);
if (priv->source_list)
@@ -1135,14 +1103,15 @@
static void
activate_source (AddressbookView *view,
- ESource *source,
- const char *uid)
+ ESource *source)
{
AddressbookViewPrivate *priv = view->priv;
+ const char *uid;
GtkWidget *uid_view;
EBook *book;
BookOpenData *data;
+ uid = e_source_peek_uid (source);
uid_view = g_hash_table_lookup (priv->uid_to_view, uid);
if (uid_view) {
@@ -1228,112 +1197,6 @@
if (bonobo_ui_component_get_container (bonobo_control_get_ui_component (priv->folder_view_control)) != CORBA_OBJECT_NIL) {
eab_view_setup_menus (EAB_VIEW (uid_view), bonobo_control_get_ui_component (priv->folder_view_control));
update_command_state (EAB_VIEW (uid_view), view);
- }
-}
-
-static void
-set_prop (BonoboPropertyBag *bag,
- const BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- AddressbookView *view = user_data;
- AddressbookViewPrivate *priv = view->priv;
- ESource *source;
-
- switch (arg_id) {
-
- case PROPERTY_FOLDER_URI_IDX: {
- const gchar *string = BONOBO_ARG_GET_STRING (arg);
- ESourceGroup *group;
-
- group = e_source_group_new ("", string);
- source = e_source_new ("", "");
- e_source_set_group (source, group);
-
- /* we use the uri as the uid here. */
- activate_source (view, source, string);
-
- g_object_unref (group);
-
- break;
- }
- case PROPERTY_SOURCE_UID_IDX: {
- const gchar *uid;
-
- uid = BONOBO_ARG_GET_STRING (arg);
-
- source = e_source_list_peek_source_by_uid (priv->source_list, uid);
-
- if (source) {
- activate_source (view, source, uid);
- }
- else {
- g_warning ("Could not find source by UID '%s'!", uid);
- }
-
- break;
- }
- default:
- g_warning ("Unhandled arg %d\n", arg_id);
- break;
- }
-}
-
-static void
-get_prop (BonoboPropertyBag *bag,
- BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- AddressbookView *view = user_data;
- EABView *v = get_current_view (view);
- ESource *source = NULL;
-
- switch (arg_id) {
-
- case PROPERTY_FOLDER_URI_IDX:
- if (v) {
- g_object_get (v,
- "source", &source,
- NULL);
- }
-
- if (source) {
- char *uri = e_source_get_uri (source);
-
- BONOBO_ARG_SET_STRING (arg, uri);
-
- g_free (uri);
- g_object_unref (source);
- }
- else {
- BONOBO_ARG_SET_STRING (arg, "");
- }
- break;
-
- case PROPERTY_SOURCE_UID_IDX:
- if (v) {
- g_object_get (v,
- "source", &source,
- NULL);
- }
-
- if (source) {
- BONOBO_ARG_SET_STRING (arg, e_source_peek_uid (source));
-
- g_object_unref (source);
- }
- else {
- BONOBO_ARG_SET_STRING (arg, "");
- }
-
- break;
-
- default:
- g_warning ("Unhandled arg %d\n", arg_id);
}
}
Index: addressbook/gui/component/component-factory.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/component-factory.c,v
retrieving revision 1.12
diff -u -r1.12 component-factory.c
--- addressbook/gui/component/component-factory.c 23 Apr 2004 15:35:36 -0000 1.12
+++ addressbook/gui/component/component-factory.c 3 May 2004 15:51:55 -0000
@@ -40,7 +40,6 @@
#define FACTORY_ID "OAFIID:GNOME_Evolution_Addressbook_Factory:" BASE_VERSION
#define VCARD_CONTROL_ID "OAFIID:GNOME_Evolution_Addressbook_VCard_Control:" BASE_VERSION
-#define ADDRESSBOOK_CONTROL_ID "OAFIID:GNOME_Evolution_Addressbook_Control:" BASE_VERSION
#define COMPONENT_ID "OAFIID:GNOME_Evolution_Addressbook_Component:" BASE_VERSION
#define ADDRESS_POPUP_ID "OAFIID:GNOME_Evolution_Addressbook_AddressPopup:" BASE_VERSION
#define SELECT_NAMES_ID "OAFIID:GNOME_Evolution_Addressbook_SelectNames:" BASE_VERSION
@@ -58,13 +57,6 @@
if (strcmp (component_id, VCARD_CONTROL_ID) == 0)
return BONOBO_OBJECT (eab_vcard_control_new ());
- if (strcmp (component_id, ADDRESSBOOK_CONTROL_ID) == 0) {
- AddressbookView *view;
-
- /* FIXME: temporary hack, leaks a view */
- view = addressbook_view_new ();
- return BONOBO_OBJECT (addressbook_view_peek_folder_view (view));
- }
if (strcmp (component_id, COMPONENT_ID) == 0) {
BonoboObject *object = BONOBO_OBJECT (addressbook_component_peek ());
bonobo_object_ref (object);
Index: calendar/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2293
diff -u -r1.2293 ChangeLog
--- calendar/ChangeLog 3 May 2004 13:12:33 -0000 1.2293
+++ calendar/ChangeLog 3 May 2004 15:51:55 -0000
@@ -1,3 +1,15 @@
+2004-05-03 Dan Winship <danw ximian com>
+
+ * 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
+
2004-05-03 JP Rosevear <jpr ximian com>
Fixes #57899
Index: calendar/gui/GNOME_Evolution_Calendar.server.in.in
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/GNOME_Evolution_Calendar.server.in.in,v
retrieving revision 1.12
diff -u -r1.12 GNOME_Evolution_Calendar.server.in.in
--- calendar/gui/GNOME_Evolution_Calendar.server.in.in 19 Apr 2004 15:19:32 -0000 1.12
+++ calendar/gui/GNOME_Evolution_Calendar.server.in.in 3 May 2004 15:51:55 -0000
@@ -48,24 +48,6 @@
<oaf_attribute name="evolution:button_sort_order" type="string" value="-8"/>
</oaf_server>
-<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_Control:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Calendar_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:BonoboControl/calendar-control:@VERSION@"/>
- <item value="IDL:Bonobo/Control:1.0"/>
- <item value="IDL:Bonobo/PropertyBag:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="bonobo:supported_mime_types" type="stringv">
- <item value="text/calendar"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Calendar viewer"/>
-</oaf_server>
-
<oaf_server iid="OAFIID:GNOME_Evolution_Tasks_Component:@VERSION@"
type="factory"
location="OAFIID:GNOME_Evolution_Calendar_Factory:@VERSION@">
@@ -81,24 +63,6 @@
<oaf_attribute name="evolution:button_label" type="string" _value="Tasks"/>
<oaf_attribute name="evolution:button_icon" type="string" value="stock_todo"/>
<oaf_attribute name="evolution:button_sort_order" type="string" value="-8"/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:GNOME_Evolution_Tasks_Control:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Calendar_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:BonoboControl/tasks-control:@VERSION@"/>
- <item value="IDL:Bonobo/Control:1.0"/>
- <item value="IDL:Bonobo/PropertyBag:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="bonobo:supported_mime_types" type="stringv">
- <item value="text/calendar"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Tasks viewer"/>
</oaf_server>
<oaf_server iid="OAFIID:GNOME_Evolution_Calendar_CompEditorFactory:@VERSION@"
Index: calendar/gui/control-factory.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/control-factory.c,v
retrieving revision 1.46
diff -u -r1.46 control-factory.c
--- calendar/gui/control-factory.c 7 Apr 2004 16:12:22 -0000 1.46
+++ calendar/gui/control-factory.c 3 May 2004 15:51:55 -0000
@@ -28,7 +28,6 @@
#include <bonobo/bonobo-generic-factory.h>
#include <bonobo/bonobo-persist-file.h>
#include <bonobo/bonobo-context.h>
-#include <bonobo/bonobo-property-bag.h>
#include <glade/glade.h>
#include <libgnomeui/gnome-dialog-util.h>
@@ -39,13 +38,6 @@
#include "control-factory.h"
-#define PROPERTY_CALENDAR_URI "folder_uri"
-#define PROPERTY_CALENDAR_URI_IDX 1
-
-#define PROPERTY_CALENDAR_VIEW "view"
-#define PROPERTY_CALENDAR_VIEW_IDX 2
-
-
CORBA_Environment ev;
CORBA_ORB orb;
@@ -62,149 +54,6 @@
calendar_control_deactivate (control, gcal);
}
-static void
-get_prop (BonoboPropertyBag *bag,
- BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- GnomeCalendar *gcal;
- const char *uri;
- BonoboControl *control = user_data;
-
- gcal = (GnomeCalendar *) bonobo_control_get_widget (control);
-
- switch (arg_id) {
-
- case PROPERTY_CALENDAR_URI_IDX:
- uri = e_cal_get_uri (e_cal_model_get_default_client (gnome_calendar_get_calendar_model (gcal)));
- BONOBO_ARG_SET_STRING (arg, uri);
- break;
-
- case PROPERTY_CALENDAR_VIEW_IDX:
- switch (gnome_calendar_get_view (gcal)) {
- case GNOME_CAL_DAY_VIEW:
- BONOBO_ARG_SET_STRING (arg, "day");
- break;
- case GNOME_CAL_WEEK_VIEW:
- BONOBO_ARG_SET_STRING (arg, "week");
- break;
- case GNOME_CAL_WORK_WEEK_VIEW:
- BONOBO_ARG_SET_STRING (arg, "workweek");
- break;
- case GNOME_CAL_MONTH_VIEW:
- BONOBO_ARG_SET_STRING (arg, "month");
- break;
- case GNOME_CAL_LIST_VIEW:
- BONOBO_ARG_SET_STRING (arg, "list");
- break;
- default:
- g_assert_not_reached ();
- break;
- }
- break;
-
- default:
- g_warning ("Unhandled arg %d\n", arg_id);
- }
-}
-
-static void
-set_prop (BonoboPropertyBag *bag,
- const BonoboArg *arg,
- guint arg_id,
- CORBA_Environment *ev,
- gpointer user_data)
-{
- GnomeCalendar *gcal;
- char *string;
- GnomeCalendarViewType view;
- ESource *source;
- ESourceGroup *group;
- BonoboControl *control = user_data;
-
- gcal = (GnomeCalendar *) bonobo_control_get_widget (control);
-
- switch (arg_id) {
- case PROPERTY_CALENDAR_URI_IDX:
- string = BONOBO_ARG_GET_STRING (arg);
-
- group = e_source_group_new ("", string);
- source = e_source_new ("", "");
- e_source_set_group (source, group);
-
- if (gnome_calendar_add_source (gcal, E_CAL_SOURCE_TYPE_EVENT, source)) {
- calendar_control_sensitize_calendar_commands (control, gcal, TRUE);
- } else {
- char *msg;
-
- msg = g_strdup_printf (_("Could not open the folder in '%s'"), string);
- gnome_error_dialog_parented (
- msg,
- GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (gcal))));
- g_free (msg);
- }
-
- g_object_unref (source);
- g_object_unref (group);
-
- break;
-
- case PROPERTY_CALENDAR_VIEW_IDX:
- string = BONOBO_ARG_GET_STRING (arg);
- if (!strcmp (string, "week"))
- view = GNOME_CAL_WEEK_VIEW;
- else if (!strcmp (string, "workweek"))
- view = GNOME_CAL_WORK_WEEK_VIEW;
- else if (!strcmp (string, "month"))
- view = GNOME_CAL_MONTH_VIEW;
- else if (!strcmp (string, "list"))
- view = GNOME_CAL_LIST_VIEW;
- else if (!strcmp (string, "day"))
- view = GNOME_CAL_DAY_VIEW;
- else
- view = GNOME_CAL_DAY_VIEW;
-
- /* This doesn't actually work, because the GalView
- * comes along and resets the view. FIXME.
- */
- gnome_calendar_set_view (gcal, view);
- break;
-
- default:
- g_warning ("Unhandled arg %d\n", arg_id);
- break;
- }
-}
-
-
-static void
-calendar_properties_init (GnomeCalendar *gcal, BonoboControl *control)
-{
- BonoboPropertyBag *pbag;
-
- pbag = bonobo_property_bag_new (get_prop, set_prop, control);
-
- bonobo_property_bag_add (pbag,
- PROPERTY_CALENDAR_URI,
- PROPERTY_CALENDAR_URI_IDX,
- BONOBO_ARG_STRING,
- NULL,
- _("The URI that the calendar will display"),
- 0);
- bonobo_property_bag_add (pbag,
- PROPERTY_CALENDAR_VIEW,
- PROPERTY_CALENDAR_VIEW_IDX,
- BONOBO_ARG_STRING,
- NULL,
- _("The type of view to show"),
- 0);
-
- bonobo_control_set_properties (control, bonobo_object_corba_objref (BONOBO_OBJECT (pbag)), NULL);
- bonobo_object_unref (BONOBO_OBJECT (pbag));
-}
-
BonoboControl *
control_factory_new_control (void)
{
@@ -224,8 +73,6 @@
}
g_object_set_data (G_OBJECT (gcal), "control", control);
- calendar_properties_init (gcal, control);
-
g_signal_connect (control, "activate", G_CALLBACK (control_activate_cb), gcal);
return control;
Index: calendar/gui/main.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/main.c,v
retrieving revision 1.165
diff -u -r1.165 main.c
--- calendar/gui/main.c 15 Apr 2004 14:44:20 -0000 1.165
+++ calendar/gui/main.c 3 May 2004 15:51:55 -0000
@@ -51,9 +51,7 @@
#define FACTORY_ID "OAFIID:GNOME_Evolution_Calendar_Factory:" BASE_VERSION
#define CALENDAR_COMPONENT_ID "OAFIID:GNOME_Evolution_Calendar_Component:" BASE_VERSION
-#define CALENDAR_CONTROL_ID "OAFIID:GNOME_Evolution_Calendar_Control:" BASE_VERSION
#define TASKS_COMPONENT_ID "OAFIID:GNOME_Evolution_Tasks_Component:" BASE_VERSION
-#define TASKS_CONTROL_ID "OAFIID:GNOME_Evolution_Tasks_Control:" BASE_VERSION
#define ITIP_CONTROL_ID "OAFIID:GNOME_Evolution_Calendar_iTip_Control:" BASE_VERSION
#define CONFIG_CONTROL_ID "OAFIID:GNOME_Evolution_Calendar_ConfigControl:" BASE_VERSION
#define COMP_EDITOR_FACTORY_ID "OAFIID:GNOME_Evolution_Calendar_CompEditorFactory:" BASE_VERSION
@@ -162,15 +160,11 @@
BonoboObject *object = BONOBO_OBJECT (calendar_component_peek ());
bonobo_object_ref (object);
return object;
- } else if (strcmp (component_id, CALENDAR_CONTROL_ID) == 0)
- return BONOBO_OBJECT (control_factory_new_control ());
- else if (strcmp (component_id, TASKS_COMPONENT_ID) == 0) {
+ } else if (strcmp (component_id, TASKS_COMPONENT_ID) == 0) {
BonoboObject *object = BONOBO_OBJECT (tasks_component_peek ());
bonobo_object_ref (object);
return object;
- } else if (strcmp (component_id, TASKS_CONTROL_ID) == 0)
- return BONOBO_OBJECT (tasks_control_new ());
- else if (strcmp (component_id, ITIP_CONTROL_ID) == 0)
+ } else if (strcmp (component_id, ITIP_CONTROL_ID) == 0)
return BONOBO_OBJECT (itip_bonobo_control_new ());
else if (strcmp (component_id, CONFIG_CONTROL_ID) == 0)
return BONOBO_OBJECT (cal_prefs_dialog_new ());
Index: calendar/gui/tasks-control.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/tasks-control.c,v
retrieving revision 1.75
diff -u -r1.75 tasks-control.c
--- calendar/gui/tasks-control.c 21 Jan 2004 17:55:44 -0000 1.75
+++ calendar/gui/tasks-control.c 3 May 2004 15:51:55 -0000
@@ -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,105 +110,9 @@
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;
- }
}
Index: mail/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/mail/ChangeLog,v
retrieving revision 1.3283
diff -u -r1.3283 ChangeLog
--- mail/ChangeLog 3 May 2004 12:44:09 -0000 1.3283
+++ mail/ChangeLog 3 May 2004 15:51:55 -0000
@@ -1,3 +1,14 @@
+2004-05-03 Dan Winship <danw ximian com>
+
+ * GNOME_Evolution_Mail.server.in.in: Remove the mail folder
+ control factory
+
+ * mail-component-factory.c (factory): Remove support for the mail
+ folder control
+
+ * mail-component.c: Remove the property bag stuff
+ (mail_control_new): Gone
+
2004-05-03 Not Zed <NotZed Ximian com>
* em-composer-utils.c (create_new_composer): take fromuri and
Index: mail/GNOME_Evolution_Mail.server.in.in
===================================================================
RCS file: /cvs/gnome/evolution/mail/GNOME_Evolution_Mail.server.in.in,v
retrieving revision 1.19
diff -u -r1.19 GNOME_Evolution_Mail.server.in.in
--- mail/GNOME_Evolution_Mail.server.in.in 19 Apr 2004 15:20:48 -0000 1.19
+++ mail/GNOME_Evolution_Mail.server.in.in 3 May 2004 15:51:55 -0000
@@ -76,21 +76,6 @@
_value="Evolution Mail composer"/>
</oaf_server>
- <!-- (control) -->
- <oaf_server iid="OAFIID:GNOME_Evolution_Mail_Control:@VERSION@"
- type="factory"
- location="OAFIID:GNOME_Evolution_Mail_Factory:@VERSION@">
-
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:BonoboControl/evolution-mail-control:@VERSION@"/>
- <item value="IDL:GNOME/Control:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string"
- _value="Evolution Mail folder viewer"/>
-
- </oaf_server>
-
<!-- Startup Wizard -->
<!-- (wizard) -->
<oaf_server iid="OAFIID:GNOME_Evolution_Mail_Wizard:@VERSION@"
Index: mail/mail-component-factory.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-component-factory.c,v
retrieving revision 1.11
diff -u -r1.11 mail-component-factory.c
--- mail/mail-component-factory.c 3 May 2004 10:30:59 -0000 1.11
+++ mail/mail-component-factory.c 3 May 2004 15:51:55 -0000
@@ -48,7 +48,6 @@
#define FACTORY_ID "OAFIID:GNOME_Evolution_Mail_Factory:" BASE_VERSION
#define COMPONENT_ID "OAFIID:GNOME_Evolution_Mail_Component:" BASE_VERSION
#define COMPOSER_ID "OAFIID:GNOME_Evolution_Mail_Composer:" BASE_VERSION
-#define MAIL_CONTROL_ID "OAFIID:GNOME_Evolution_Mail_Control:" BASE_VERSION
#define FOLDER_INFO_ID "OAFIID:GNOME_Evolution_FolderInfo:" BASE_VERSION
#define MAIL_CONFIG_ID "OAFIID:GNOME_Evolution_MailConfig:" BASE_VERSION
#define WIZARD_ID "OAFIID:GNOME_Evolution_Mail_Wizard:" BASE_VERSION
@@ -63,8 +62,6 @@
bonobo_object_ref (BONOBO_OBJECT (component));
return BONOBO_OBJECT (component);
- } else if (strcmp(component_id, MAIL_CONTROL_ID) == 0) {
- return (BonoboObject *) mail_control_new ();
} else if (strcmp(component_id, MAIL_CONFIG_ID) == 0) {
return (BonoboObject *)g_object_new (evolution_mail_config_get_type (), NULL);
} else if (strcmp(component_id, WIZARD_ID) == 0) {
Index: mail/mail-component.c
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-component.c,v
retrieving revision 1.79
diff -u -r1.79 mail-component.c
--- mail/mail-component.c 3 May 2004 12:44:09 -0000 1.79
+++ mail/mail-component.c 3 May 2004 15:51:55 -0000
@@ -331,42 +331,6 @@
em_folder_view_set_folder_uri (view, uri);
}
-#define PROPERTY_FOLDER_URI "folder_uri"
-#define PROPERTY_FOLDER_URI_IDX 1
-
-static void
-set_prop(BonoboPropertyBag *bag, const BonoboArg *arg, guint arg_id, CORBA_Environment *ev, gpointer user_data)
-{
- EMFolderView *view = (EMFolderView *)bonobo_control_get_widget (user_data);
-
- switch (arg_id) {
- case PROPERTY_FOLDER_URI_IDX:
- em_folder_view_set_folder_uri (view, BONOBO_ARG_GET_STRING (arg));
- break;
- default:
- g_warning ("Unhandled arg %d\n", arg_id);
- break;
- }
-}
-
-static void
-get_prop(BonoboPropertyBag *bag, BonoboArg *arg, guint arg_id, CORBA_Environment *ev, gpointer user_data)
-{
- GtkWidget *widget = bonobo_control_get_widget (user_data);
- EMFolderView *view = (EMFolderView *)widget;
-
- switch (arg_id) {
- case PROPERTY_FOLDER_URI_IDX:
- if (view->folder_uri)
- BONOBO_ARG_SET_STRING (arg, view->folder_uri);
- else
- BONOBO_ARG_SET_STRING (arg, "");
- break;
- default:
- g_warning ("Unhandled arg %d\n", arg_id);
- }
-}
-
static int
check_autosave(void *data)
{
@@ -850,38 +814,6 @@
}
/* Public API. */
-BonoboControl *
-mail_control_new (void)
-{
- BonoboControl *view_control;
- GtkWidget *view_widget;
- BonoboPropertyBag *pbag;
-
- view_widget = em_folder_browser_new ();
- em_folder_view_set_statusbar ((EMFolderView *) view_widget, FALSE);
- gtk_widget_show (view_widget);
-
- view_control = bonobo_control_new (view_widget);
- pbag = bonobo_property_bag_new (get_prop, set_prop, view_control);
-
- bonobo_property_bag_add (pbag,
- PROPERTY_FOLDER_URI,
- PROPERTY_FOLDER_URI_IDX,
- BONOBO_ARG_STRING,
- NULL,
- _("URI of the mail source that the view will display"),
- 0);
-
- bonobo_control_set_properties (view_control,
- bonobo_object_corba_objref (BONOBO_OBJECT (pbag)),
- NULL);
- bonobo_object_unref (BONOBO_OBJECT (pbag));
-
- g_signal_connect (view_control, "activate", G_CALLBACK (view_control_activate_cb), view_widget);
-
- return view_control;
-}
-
MailComponent *
mail_component_peek (void)
{
Index: mail/mail-component.h
===================================================================
RCS file: /cvs/gnome/evolution/mail/mail-component.h,v
retrieving revision 1.12
diff -u -r1.12 mail-component.h
--- mail/mail-component.h 17 Feb 2004 21:02:56 -0000 1.12
+++ mail/mail-component.h 3 May 2004 15:51:55 -0000
@@ -64,8 +64,6 @@
GType mail_component_get_type (void);
-struct _BonoboControl *mail_control_new(void);
-
MailComponent *mail_component_peek (void);
/* NOTE: Using NULL as the component implies using the default component */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]