Files
evolution/my-evolution/e-summary-offline-handler.h
Ettore Perazzoli 8d91d34611 [Fix a crash that can happen if you have opened multiple views of
the summary and try to go off-line.  This is not the correct fix,
as the code should really be changed to only use one set of
connections for all the views, instead of binding the connections
to the view.]

* e-summary-factory.c (e_summary_factory_new_control): Call
`e_summary_offline_handler_add_summary()' instead of
e_summary_offline_handler_set_summary()'.

* e-summary-offline-handler.c: Replace member `summary' with
`summaries' in the ESummaryOfflineHandlerPriv.  This way, instead
of assuming that there is only one summary, we keep a list of the
summaries.
(impl_destroy): Free ->summaries.
(e_summary_offline_handler_set_summary): Removed.
(e_summary_offline_handler_add_summary): New.  Add the summary to
->summaries.  Also, connect to the ::destroy handler so we can
bookkeep them correctly.
(create_connection_list): Made private from
e_summary_offline_handler_create_connection_list().  Get a GSList
instead of just one summary, and sum up all the connections from
it.
(impl_prepareForOffline): Use it.
(impl__get_isOffline): Return %FALSE if any of the summaries are
online, %TRUE otherwise.
(impl_goOffline): Call ::set_online on all the summaries.  Pass
CORBA_OBJECT_NIL for the progress_listener as it doesn't really
get used anyways.
(impl_goOnline): Likewise.  Pass CORBA_OBJECT_NIL, not NULL, for
the progress CORBA_Object pointer.

svn path=/trunk/; revision=15547
2002-02-01 20:32:08 +00:00

75 lines
2.2 KiB
C
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* e-summary-offline-handler.h
*
* Copyright (C) 2001 Ximian, Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
* License as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
* Authors:
* Ettore Perazzoli <ettore@ximian.com>
* Dan Winship <danw@ximian.com>
* Iain Holmes <iain@ximian.com>
*/
#ifndef __E_SUMMARY_OFFLINE_HANDLER_H__
#define __E_SUMMARY_OFFLINE_HANDLER_H__
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <bonobo/bonobo-xobject.h>
#include "e-summary.h"
#include "Evolution.h"
#ifdef __cplusplus
extern "C" {
#pragma }
#endif
#define E_SUMMARY_TYPE_OFFLINE_HANDLER (e_summary_offline_handler_get_type ())
#define E_SUMMARY_OFFLINE_HANDLER(obj) (GTK_CHECK_CAST ((obj), E_SUMMARY_TYPE_OFFLINE_HANDLER, ESummaryOfflineHandler))
#define E_SUMMARY_OFFLINE_HANDLER_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), E_SUMMARY_TYPE_OFFLINE_HANDLER, ESummaryOfflineHandlerClass))
typedef struct _ESummaryOfflineHandler ESummaryOfflineHandler;
typedef struct _ESummaryOfflineHandlerPriv ESummaryOfflineHandlerPriv;
typedef struct _ESummaryOfflineHandlerClass ESummaryOfflineHandlerClass;
struct _ESummaryOfflineHandler {
BonoboXObject parent;
ESummaryOfflineHandlerPriv *priv;
};
struct _ESummaryOfflineHandlerClass {
BonoboXObjectClass parent_class;
POA_GNOME_Evolution_Offline__epv epv;
};
GtkType e_summary_offline_handler_get_type (void);
ESummaryOfflineHandler *e_summary_offline_handler_new (void);
void e_summary_offline_handler_add_summary (ESummaryOfflineHandler *handler,
ESummary *summary);
#ifdef __cplusplus
}
#endif
#endif