Updated for function rename.
2003-01-10 Jeffrey Stedfast <fejj@ximian.com> * component-factory.c (factory): Updated for function rename. * mail-config-factory.c (mail_config_control_factory_cb): Namespaced the function name. * folder-browser-ui.c (folder_browser_ui_add_global): Don't add the listener for show_preview here, it was moved into folder-browser.c so we could detach the listener when the folder-browser is destroyed. Also prevents a listener being added multiple times (which was possible? before). * folder-browser.c (folder_browser_destroy): Remove the gconf notify handler for show_preview. (show_preview_changed): Moved here from folder-browser-ui.c svn path=/trunk/; revision=19408
This commit is contained in:

committed by
Jeffrey Stedfast

parent
794ff9b527
commit
4a8c1c7323
@ -1,5 +1,20 @@
|
||||
2003-01-10 Jeffrey Stedfast <fejj@ximian.com>
|
||||
|
||||
* component-factory.c (factory): Updated for function rename.
|
||||
|
||||
* mail-config-factory.c (mail_config_control_factory_cb):
|
||||
Namespaced the function name.
|
||||
|
||||
* folder-browser-ui.c (folder_browser_ui_add_global): Don't add
|
||||
the listener for show_preview here, it was moved into
|
||||
folder-browser.c so we could detach the listener when the
|
||||
folder-browser is destroyed. Also prevents a listener being added
|
||||
multiple times (which was possible? before).
|
||||
|
||||
* folder-browser.c (folder_browser_destroy): Remove the gconf
|
||||
notify handler for show_preview.
|
||||
(show_preview_changed): Moved here from folder-browser-ui.c
|
||||
|
||||
* component-factory.c (storage_remove_folder): Fixed a situation
|
||||
in which we could notify the shell listener twice.
|
||||
|
||||
|
@ -181,6 +181,9 @@ glade_DATA = mail-config.glade local-config.glade subscribe-dialog.glade message
|
||||
etspecdir = $(datadir)/evolution/etspec/
|
||||
etspec_DATA = mail-accounts.etspec message-list.etspec subscribe-dialog.etspec
|
||||
|
||||
schemadir = $(GCONF_SCHEMA_FILE_DIR)
|
||||
schema_DATA = evolution-mail.schemas
|
||||
|
||||
iconsdir = $(datadir)/evolution/images
|
||||
buttonsdir = $(datadir)/evolution/images/buttons
|
||||
|
||||
|
@ -20,19 +20,23 @@
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
|
||||
#include <gconf/gconf.h>
|
||||
#include <gconf/gconf-client.h>
|
||||
|
||||
#include <bonobo/bonobo-generic-factory.h>
|
||||
#include <gal/widgets/e-gui-utils.h>
|
||||
#include <camel/camel.h>
|
||||
|
||||
#include "camel.h"
|
||||
#include <bonobo/bonobo-generic-factory.h>
|
||||
#include <bonobo/bonobo-shlib-factory.h>
|
||||
|
||||
#include <gal/widgets/e-gui-utils.h>
|
||||
|
||||
#include "Evolution.h"
|
||||
#include "evolution-storage.h"
|
||||
@ -46,6 +50,8 @@
|
||||
#include "mail.h"
|
||||
#include "mail-config.h"
|
||||
#include "mail-config-factory.h"
|
||||
#include "mail-preferences.h"
|
||||
#include "mail-composer-prefs.h"
|
||||
#include "mail-tools.h"
|
||||
#include "mail-ops.h"
|
||||
#include "mail-offline-handler.h"
|
||||
@ -1593,14 +1599,6 @@ mail_storages_foreach (GHFunc func, gpointer data)
|
||||
}
|
||||
|
||||
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#include <bonobo/bonobo-shlib-factory.h>
|
||||
#include "folder-info.h"
|
||||
#include "mail-preferences.h"
|
||||
#include "mail-composer-prefs.h"
|
||||
|
||||
#define FACTORY_ID "OAFIID:GNOME_Evolution_Mail_ControlFactory"
|
||||
|
||||
#define MAIL_CONFIG_IID "OAFIID:GNOME_Evolution_MailConfig"
|
||||
@ -1630,7 +1628,7 @@ factory (BonoboGenericFactory *factory,
|
||||
|| strcmp (component_id, MAIL_PREFERENCES_CONTROL_ID) == 0
|
||||
|| strcmp (component_id, MAIL_COMPOSER_PREFS_CONTROL_ID) == 0
|
||||
|| strcmp (component_id, MAIL_FONT_PREFS_CONTROL_ID) == 0)
|
||||
return config_control_factory_cb(factory, component_id, evolution_shell_client_corba_objref (global_shell_client));
|
||||
return mail_config_control_factory_cb (factory, component_id, evolution_shell_client_corba_objref (global_shell_client));
|
||||
|
||||
g_warning (FACTORY_ID ": Don't know what to do with %s", component_id);
|
||||
return NULL;
|
||||
|
@ -602,17 +602,6 @@ folder_browser_ui_rm_list (FolderBrowser *fb)
|
||||
folder_browser_ui_discard_view_menus (fb);
|
||||
}
|
||||
|
||||
static void
|
||||
show_preview_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data)
|
||||
{
|
||||
FolderBrowser *fb = user_data;
|
||||
gboolean show_preview;
|
||||
|
||||
show_preview = gconf_client_get_bool (client, "/apps/evolution/mail/display/show_preview", NULL);
|
||||
bonobo_ui_component_set_prop (fb->uicomp, "/commands/ViewPreview", "state", show_preview ? "1" : "0", NULL);
|
||||
folder_browser_set_message_preview (fb, show_preview);
|
||||
}
|
||||
|
||||
void
|
||||
folder_browser_ui_add_global (FolderBrowser *fb)
|
||||
{
|
||||
@ -630,15 +619,6 @@ folder_browser_ui_add_global (FolderBrowser *fb)
|
||||
gconf = gconf_client_get_default ();
|
||||
|
||||
/* (Pre)view toggle */
|
||||
|
||||
/* watch the show_preview setting */
|
||||
gconf_client_add_dir (gconf, "/apps/evolution/mail/display/show_preview",
|
||||
GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
|
||||
|
||||
/* listen for changed events to the show_preview setting */
|
||||
gconf_client_notify_add (gconf, "/apps/evolution/mail/display/show_preview",
|
||||
show_preview_changed, fb, NULL, NULL);
|
||||
|
||||
show_preview = gconf_client_get_bool (gconf, "/apps/evolution/mail/display/show_preview", NULL);
|
||||
bonobo_ui_component_set_prop (uic, "/commands/ViewPreview", "state", show_preview ? "1" : "0", NULL);
|
||||
|
||||
|
@ -160,11 +160,14 @@ folder_browser_destroy (GtkObject *object)
|
||||
{
|
||||
FolderBrowser *folder_browser;
|
||||
CORBA_Environment ev;
|
||||
GConfClient *gconf;
|
||||
|
||||
folder_browser = FOLDER_BROWSER (object);
|
||||
|
||||
|
||||
gconf = gconf_client_get_default ();
|
||||
|
||||
CORBA_exception_init (&ev);
|
||||
|
||||
|
||||
if (folder_browser->seen_id != 0) {
|
||||
gtk_timeout_remove (folder_browser->seen_id);
|
||||
folder_browser->seen_id = 0;
|
||||
@ -194,12 +197,17 @@ folder_browser_destroy (GtkObject *object)
|
||||
g_object_unref (folder_browser->view_menus);
|
||||
folder_browser->view_menus = NULL;
|
||||
}
|
||||
|
||||
|
||||
if (folder_browser->paned_size_notify_id != 0) {
|
||||
gconf_client_notify_remove(gconf_client_get_default (), folder_browser->paned_size_notify_id);
|
||||
gconf_client_notify_remove (gconf, folder_browser->paned_size_notify_id);
|
||||
folder_browser->paned_size_notify_id = 0;
|
||||
}
|
||||
|
||||
if (folder_browser->show_preview_notify_id != 0) {
|
||||
gconf_client_notify_remove (gconf, folder_browser->show_preview_notify_id);
|
||||
folder_browser->show_preview_notify_id = 0;
|
||||
}
|
||||
|
||||
/* wait for all outstanding async events against us */
|
||||
mail_async_event_destroy (folder_browser->async_event);
|
||||
|
||||
@ -2339,12 +2347,23 @@ paned_size_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpoin
|
||||
FolderBrowser *fb = user_data;
|
||||
int paned_size;
|
||||
|
||||
g_signal_handler_block (fb->message_list, fb->resize_id);
|
||||
g_signal_handler_block (fb->message_list, fb->paned_resize_id);
|
||||
|
||||
paned_size = gconf_client_get_int (client, "/apps/evolution/mail/display/paned_size", NULL);
|
||||
e_paned_set_position (E_PANED (fb->vpaned), paned_size);
|
||||
|
||||
g_signal_handler_unblock (fb->message_list, fb->resize_id);
|
||||
g_signal_handler_unblock (fb->message_list, fb->paned_resize_id);
|
||||
}
|
||||
|
||||
static void
|
||||
show_preview_changed (GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data)
|
||||
{
|
||||
FolderBrowser *fb = user_data;
|
||||
gboolean show_preview;
|
||||
|
||||
show_preview = gconf_client_get_bool (client, "/apps/evolution/mail/display/show_preview", NULL);
|
||||
bonobo_ui_component_set_prop (fb->uicomp, "/commands/ViewPreview", "state", show_preview ? "1" : "0", NULL);
|
||||
folder_browser_set_message_preview (fb, show_preview);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -2398,12 +2417,12 @@ folder_browser_gui_init (FolderBrowser *fb)
|
||||
e_paned_add1 (E_PANED (fb->vpaned), GTK_WIDGET (fb->message_list));
|
||||
gtk_widget_show (GTK_WIDGET (fb->message_list));
|
||||
|
||||
fb->resize_id = g_signal_connect (fb->message_list, "size_allocate",
|
||||
G_CALLBACK (fb_resize_cb), fb);
|
||||
fb->paned_resize_id = g_signal_connect (fb->message_list, "size_allocate",
|
||||
G_CALLBACK (fb_resize_cb), fb);
|
||||
|
||||
gconf = gconf_client_get_default ();
|
||||
|
||||
/* listen for updates */
|
||||
/* paned size */
|
||||
gconf_client_add_dir (gconf, "/apps/evolution/mail/display/paned_size",
|
||||
GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
|
||||
|
||||
@ -2412,6 +2431,14 @@ folder_browser_gui_init (FolderBrowser *fb)
|
||||
|
||||
paned_size = gconf_client_get_int (gconf, "/apps/evolution/mail/display/paned_size", NULL);
|
||||
|
||||
/* show preview-pane */
|
||||
gconf_client_add_dir (gconf, "/apps/evolution/mail/display/show_preview",
|
||||
GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
|
||||
|
||||
/* listen for changed events to the show_preview setting */
|
||||
fb->show_preview_notify_id = gconf_client_notify_add (gconf, "/apps/evolution/mail/display/show_preview",
|
||||
show_preview_changed, fb, NULL, NULL);
|
||||
|
||||
e_paned_add2 (E_PANED (fb->vpaned), GTK_WIDGET (fb->mail_display));
|
||||
e_paned_set_position (E_PANED (fb->vpaned), paned_size);
|
||||
gtk_widget_show (GTK_WIDGET (fb->mail_display));
|
||||
|
@ -59,9 +59,11 @@ struct _FolderBrowser {
|
||||
guint loading_id;
|
||||
guint seen_id;
|
||||
|
||||
gulong resize_id;
|
||||
gulong paned_resize_id;
|
||||
guint paned_size_notify_id;
|
||||
|
||||
|
||||
guint show_preview_notify_id;
|
||||
|
||||
/* a folder we are expunging, dont use other than to compare the pointer value */
|
||||
CamelFolder *expunging;
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
@ -45,12 +46,6 @@
|
||||
#include "mail.h"
|
||||
#include "mail-session.h"
|
||||
|
||||
#include <bonobo/bonobo-exception.h>
|
||||
#include <bonobo/bonobo-control.h>
|
||||
#include <bonobo/bonobo-widget.h>
|
||||
#include <bonobo/bonobo-generic-factory.h>
|
||||
#include <bonobo/bonobo-context.h>
|
||||
|
||||
#include <evolution-wizard.h>
|
||||
|
||||
static void mail_config_druid_class_init (MailConfigDruidClass *class);
|
||||
|
@ -28,11 +28,15 @@ extern "C" {
|
||||
#pragma }
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <camel.h>
|
||||
#include <glade/glade.h>
|
||||
#include <libgnomeui/gnome-druid.h>
|
||||
#include <libgnomeui/gnome-file-entry.h>
|
||||
#include <glade/glade.h>
|
||||
#include <camel.h>
|
||||
#include <bonobo/bonobo-listener.h>
|
||||
#include <bonobo/bonobo-control.h>
|
||||
#include <bonobo/bonobo-widget.h>
|
||||
#include <bonobo/bonobo-generic-factory.h>
|
||||
#include <bonobo/bonobo-context.h>
|
||||
#include "shell/Evolution.h"
|
||||
#include "mail-account-gui.h"
|
||||
|
||||
@ -82,6 +86,9 @@ char *mail_config_druid_get_transport_url (MailConfigDruid *druid);
|
||||
gboolean mail_config_druid_get_save_transport_password (MailConfigDruid *druid);
|
||||
gboolean mail_config_druid_get_transport_requires_auth (MailConfigDruid *druid);
|
||||
|
||||
|
||||
BonoboObject *evolution_mail_config_wizard_new (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
@ -33,8 +33,6 @@
|
||||
|
||||
#include "mail-config-factory.h"
|
||||
|
||||
#include <bonobo/bonobo-generic-factory.h>
|
||||
|
||||
#define CONFIG_CONTROL_FACTORY_ID "OAFIID:GNOME_Evolution_Mail_ConfigControlFactory"
|
||||
|
||||
static BonoboGenericFactory *factory = NULL;
|
||||
@ -63,7 +61,7 @@ config_control_apply_cb (EvolutionConfigControl *config_control, void *user_data
|
||||
}
|
||||
|
||||
BonoboObject *
|
||||
config_control_factory_cb (BonoboGenericFactory *factory, const char *component_id, void *user_data)
|
||||
mail_config_control_factory_cb (BonoboGenericFactory *factory, const char *component_id, void *user_data)
|
||||
{
|
||||
GNOME_Evolution_Shell shell = (GNOME_Evolution_Shell) user_data;
|
||||
EvolutionConfigControl *control;
|
||||
|
@ -29,12 +29,15 @@ extern "C" {
|
||||
#pragma }
|
||||
#endif
|
||||
|
||||
#include <bonobo/bonobo-generic-factory.h>
|
||||
#include "evolution-config-control.h"
|
||||
|
||||
#include <shell/Evolution.h>
|
||||
|
||||
gboolean mail_config_register_factory (GNOME_Evolution_Shell shell);
|
||||
|
||||
BonoboObject *mail_config_control_factory_cb (BonoboGenericFactory *factory, const char *component_id, void *user_data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user