aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-10-31 04:51:26 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-10-31 04:51:26 +0800
commit80e6c5adad4e89846c004efb2029d4db9ec2e64f (patch)
tree4a1252574114d2c70040d9013bdebd9941c2c1c1 /mail
parentd6b8b58bb45b16c1cb3a575c277ffdc77441e2df (diff)
downloadgsoc2013-evolution-80e6c5adad4e89846c004efb2029d4db9ec2e64f.tar
gsoc2013-evolution-80e6c5adad4e89846c004efb2029d4db9ec2e64f.tar.gz
gsoc2013-evolution-80e6c5adad4e89846c004efb2029d4db9ec2e64f.tar.bz2
gsoc2013-evolution-80e6c5adad4e89846c004efb2029d4db9ec2e64f.tar.lz
gsoc2013-evolution-80e6c5adad4e89846c004efb2029d4db9ec2e64f.tar.xz
gsoc2013-evolution-80e6c5adad4e89846c004efb2029d4db9ec2e64f.tar.zst
gsoc2013-evolution-80e6c5adad4e89846c004efb2029d4db9ec2e64f.zip
Add popup menus to the calendar memopad and taskpad.
Implement support for "hide completed tasks" option (not yet tested). Flesh out most of the Preferences window. Still need Certificates page. svn path=/branches/kill-bonobo/; revision=36701
Diffstat (limited to 'mail')
-rw-r--r--mail/Makefile.am12
-rw-r--r--mail/e-mail-shell-module.c65
-rw-r--r--mail/e-mail-shell-module.h3
-rw-r--r--mail/em-account-prefs.c20
-rw-r--r--mail/em-account-prefs.h60
-rw-r--r--mail/em-mailer-prefs.h185
-rw-r--r--mail/em-network-prefs.h119
-rw-r--r--mail/mail-config-factory.c63
-rw-r--r--mail/mail-config-factory.h44
9 files changed, 248 insertions, 323 deletions
diff --git a/mail/Makefile.am b/mail/Makefile.am
index 8eaf2ae5de..5165e04527 100644
--- a/mail/Makefile.am
+++ b/mail/Makefile.am
@@ -53,6 +53,8 @@ libevolution_module_mail_la_SOURCES = \
e-searching-tokenizer.h \
em-account-editor.c \
em-account-editor.h \
+ em-account-prefs.c \
+ em-account-prefs.h \
em-composer-prefs.c \
em-composer-prefs.h \
em-composer-utils.c \
@@ -105,6 +107,10 @@ libevolution_module_mail_la_SOURCES = \
em-inline-filter.h \
em-junk-hook.c \
em-junk-hook.h \
+ em-mailer-prefs.c \
+ em-mailer-prefs.h \
+ em-network-prefs.c \
+ em-network-prefs.h \
em-popup.c \
em-popup.h \
em-search-context.c \
@@ -238,14 +244,10 @@ libevolution_module_mail_la_LIBADD = \
# em-icon-stream.c \
# em-inline-filter.c \
# em-junk-hook.c \
-# em-mailer-prefs.c \
-# em-mailer-prefs.h \
# em-menu.c \
# em-message-browser.c \
# em-migrate.c \
# em-migrate.h \
-# em-network-prefs.c \
-# em-network-prefs.h \
# em-popup.c \
# em-search-context.c \
# em-search-context.h \
@@ -263,8 +265,6 @@ libevolution_module_mail_la_LIBADD = \
# mail-autofilter.c \
# mail-component-factory.c \
# mail-component.c \
-# mail-config-factory.c \
-# mail-config-factory.h \
# mail-config.c \
# mail-crypto.c \
# mail-crypto.h \
diff --git a/mail/e-mail-shell-module.c b/mail/e-mail-shell-module.c
index 7ee718a9de..b7aa7a68c1 100644
--- a/mail/e-mail-shell-module.c
+++ b/mail/e-mail-shell-module.c
@@ -27,17 +27,22 @@
#include "e-util/e-util.h"
#include "shell/e-shell.h"
#include "shell/e-shell-window.h"
+#include "widgets/misc/e-preferences-window.h"
#include "e-mail-shell-view.h"
#include "e-mail-shell-module.h"
#include "e-mail-shell-module-migrate.h"
+#include "em-account-prefs.h"
+#include "em-composer-prefs.h"
#include "em-config.h"
#include "em-event.h"
#include "em-folder-tree-model.h"
#include "em-format-hook.h"
#include "em-format-html-display.h"
#include "em-junk-hook.h"
+#include "em-mailer-prefs.h"
+#include "em-network-prefs.h"
#include "mail-config.h"
#include "mail-folder-cache.h"
#include "mail-mt.h"
@@ -413,17 +418,57 @@ static GtkActionEntry source_entries[] = {
G_CALLBACK (action_mail_folder_new_cb) }
};
+static void
+mail_shell_module_init_preferences (void)
+{
+ GtkWidget *preferences_window;
+
+ preferences_window = e_shell_get_preferences_window ();
+
+ e_preferences_window_add_page (
+ E_PREFERENCES_WINDOW (preferences_window),
+ "mail-accounts",
+ "preferences-mail-accounts",
+ _("Mail Accounts"),
+ em_account_prefs_new (),
+ 100);
+
+ e_preferences_window_add_page (
+ E_PREFERENCES_WINDOW (preferences_window),
+ "mail",
+ "preferences-mail",
+ _("Mail Preferences"),
+ em_mailer_prefs_new (),
+ 300);
+
+ e_preferences_window_add_page (
+ E_PREFERENCES_WINDOW (preferences_window),
+ "composer",
+ "preferences-composer",
+ _("Composer Preferences"),
+ em_composer_prefs_new (),
+ 400);
+
+ e_preferences_window_add_page (
+ E_PREFERENCES_WINDOW (preferences_window),
+ "system-network-proxy",
+ "preferences-system-network-proxy",
+ _("Network Preferences"),
+ em_network_prefs_new (),
+ 500);
+}
+
static gboolean
-mail_module_handle_uri (EShellModule *shell_module,
- const gchar *uri)
+mail_shell_module_handle_uri (EShellModule *shell_module,
+ const gchar *uri)
{
/* FIXME */
return FALSE;
}
static void
-mail_module_window_created (EShellModule *shell_module,
- EShellWindow *shell_window)
+mail_shell_module_window_created (EShellModule *shell_module,
+ EShellWindow *shell_window)
{
EShell *shell;
const gchar *module_name;
@@ -489,17 +534,18 @@ e_shell_module_init (GTypeModule *type_module)
g_signal_connect_swapped (
shell, "handle-uri",
- G_CALLBACK (mail_module_handle_uri), shell_module);
+ G_CALLBACK (mail_shell_module_handle_uri), shell_module);
g_signal_connect_swapped (
shell, "window-created",
- G_CALLBACK (mail_module_window_created), shell_module);
+ G_CALLBACK (mail_shell_module_window_created), shell_module);
mail_config_init ();
mail_msg_init ();
mail_shell_module_init_local_store (shell_module);
mail_shell_module_load_accounts (shell_module);
+ mail_shell_module_init_preferences ();
}
/******************************** Public API *********************************/
@@ -597,3 +643,10 @@ fail:
return NULL;
}
+
+void
+e_mail_shell_module_remove_store_by_uri (EShellModule *shell_module,
+ const gchar *uri)
+{
+ /* FIXME */
+}
diff --git a/mail/e-mail-shell-module.h b/mail/e-mail-shell-module.h
index fb1cd3885d..b15c8ed8c8 100644
--- a/mail/e-mail-shell-module.h
+++ b/mail/e-mail-shell-module.h
@@ -66,6 +66,9 @@ CamelStore * e_mail_shell_module_load_store_by_uri
(EShellModule *shell_module,
const gchar *uri,
const gchar *name);
+void e_mail_shell_module_remove_store_by_uri
+ (EShellModule *shell_module,
+ const gchar *uri);
G_END_DECLS
diff --git a/mail/em-account-prefs.c b/mail/em-account-prefs.c
index 56bb4ce1df..e27c7d3ee3 100644
--- a/mail/em-account-prefs.c
+++ b/mail/em-account-prefs.c
@@ -28,7 +28,6 @@
#include <glib/gi18n.h>
-#include "mail-component.h"
#include "mail-config.h"
#include "mail-ops.h"
#include "mail-send-recv.h"
@@ -38,8 +37,8 @@
#include "e-util/e-util-private.h"
#include "em-account-prefs.h"
-
#include "em-account-editor.h"
+#include "e-mail-shell-module.h"
static void em_account_prefs_class_init (EMAccountPrefsClass *class);
static void em_account_prefs_init (EMAccountPrefs *prefs);
@@ -239,7 +238,8 @@ account_delete_clicked (GtkButton *button, gpointer user_data)
/* remove it from the folder-tree in the shell */
if (account->enabled && account->source && account->source->url)
- mail_component_remove_store_by_uri (mail_component_peek (), account->source->url);
+ e_mail_shell_module_remove_store_by_uri (
+ mail_shell_module, account->source->url);
/* remove all the proxies account has created*/
if (has_proxies)
@@ -292,17 +292,16 @@ account_default_clicked (GtkButton *button, gpointer user_data)
static void
account_able_changed(EAccount *account)
{
- MailComponent *component = mail_component_peek ();
-
/* FIXME: do this directly by listening to the mail accounts changed events in the relevant components */
if (account->source->url) {
if (account->enabled)
- mail_component_load_store_by_uri (component,
- account->source->url,
- account->name);
+ e_mail_shell_module_load_store_by_uri (
+ mail_shell_module,
+ account->source->url, account->name);
else
- mail_component_remove_store_by_uri (component, account->source->url);
+ e_mail_shell_module_remove_store_by_uri (
+ mail_shell_module, account->source->url);
}
mail_config_write ();
@@ -565,13 +564,12 @@ em_account_prefs_construct (EMAccountPrefs *prefs)
}
GtkWidget *
-em_account_prefs_new (GNOME_Evolution_Shell shell)
+em_account_prefs_new (void)
{
EMAccountPrefs *new;
new = (EMAccountPrefs *) g_object_new (em_account_prefs_get_type (), NULL);
em_account_prefs_construct (new);
- new->shell = shell;
return (GtkWidget *) new;
}
diff --git a/mail/em-account-prefs.h b/mail/em-account-prefs.h
index c63b9f562e..c3932aefc9 100644
--- a/mail/em-account-prefs.h
+++ b/mail/em-account-prefs.h
@@ -21,29 +21,33 @@
*
*/
-#ifndef __EM_ACCOUNT_PREFS_H__
-#define __EM_ACCOUNT_PREFS_H__
+#ifndef EM_ACCOUNT_PREFS_H
+#define EM_ACCOUNT_PREFS_H
#include <gtk/gtk.h>
#include <glade/glade.h>
-
#include <table/e-table.h>
-#include "evolution-config-control.h"
-
-#include <shell/Evolution.h>
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-
-#define EM_ACCOUNT_PREFS_TYPE (em_account_prefs_get_type ())
-#define EM_ACCOUNT_PREFS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EM_ACCOUNT_PREFS_TYPE, EMAccountPrefs))
-#define EM_ACCOUNT_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EM_ACCOUNT_PREFS_TYPE, EMAccountPrefsClass))
-#define EM_IS_ACCOUNT_PREFS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EM_ACCOUNT_PREFS_TYPE))
-#define EM_IS_ACCOUNT_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EM_ACCOUNT_PREFS_TYPE))
+/* Standard GObject macros */
+#define EM_TYPE_ACCOUNT_PREFS \
+ (em_account_prefs_get_type ())
+#define EM_ACCOUNT_PREFS(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), EM_TYPE_ACCOUNT_PREFS, EMAccountPrefs))
+#define EM_ACCOUNT_PREFS_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), EM_TYPE_ACCOUNT_PREFS, EMAccountPrefsClass))
+#define EM_IS_ACCOUNT_PREFS(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), EM_TYPE_ACCOUNT_PREFS))
+#define EM_IS_ACCOUNT_PREFS_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), EM_TYPE_ACCOUNT_PREFS))
+#define EM_ACCOUNT_PREFS_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), EM_TYPE_ACCOUNT_PREFS, EMAccountPrefsClass))
+
+G_BEGIN_DECLS
typedef struct _EMAccountPrefs EMAccountPrefs;
typedef struct _EMAccountPrefsClass EMAccountPrefsClass;
@@ -51,8 +55,6 @@ typedef struct _EMAccountPrefsClass EMAccountPrefsClass;
struct _EMAccountPrefs {
GtkVBox parent_object;
- GNOME_Evolution_Shell shell;
-
GladeXML *gui;
GtkWidget *druid;
@@ -71,21 +73,11 @@ struct _EMAccountPrefs {
struct _EMAccountPrefsClass {
GtkVBoxClass parent_class;
-
- /* signals */
-
};
+GType em_account_prefs_get_type (void);
+GtkWidget * em_account_prefs_new (void);
-GType em_account_prefs_get_type (void);
-
-GtkWidget *em_account_prefs_new (GNOME_Evolution_Shell shell);
-
-/* needed by global config */
-#define EM_ACCOUNT_PREFS_CONTROL_ID "OAFIID:GNOME_Evolution_Mail_AccountPrefs_ConfigControl:" BASE_VERSION
-
-#ifdef __cplusplus
-}
-#endif
+G_END_DECLS
-#endif /* __EM_ACCOUNT_PREFS_H__ */
+#endif /* EM_ACCOUNT_PREFS_H */
diff --git a/mail/em-mailer-prefs.h b/mail/em-mailer-prefs.h
index 63c85af65e..4073725dda 100644
--- a/mail/em-mailer-prefs.h
+++ b/mail/em-mailer-prefs.h
@@ -20,35 +20,33 @@
*
*/
-#ifndef __EM_MAILER_PREFS_H__
-#define __EM_MAILER_PREFS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
+#ifndef EM_MAILER_PREFS_H
+#define EM_MAILER_PREFS_H
#include <gtk/gtk.h>
-#include <shell/Evolution.h>
-
-struct _ESignature;
-struct _GtkToggleButton;
-struct _GtkOptionMenu;
-struct _GdkPixbuf;
-struct _GtkWidget;
-struct _GladeXML;
-struct _GtkFileChooserbutton;
-struct _GtkFontButton;
-struct _GConfClient;
-struct _GtkButton;
-struct _GtkTreeView;
-struct _GtkWindow;
-
-#define EM_MAILER_PREFS_TYPE (em_mailer_prefs_get_type ())
-#define EM_MAILER_PREFS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EM_MAILER_PREFS_TYPE, EMMailerPrefs))
-#define EM_MAILER_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EM_MAILER_PREFS_TYPE, EMMailerPrefsClass))
-#define EM_IS_MAILER_PREFS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EM_MAILER_PREFS_TYPE))
-#define EM_IS_MAILER_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EM_MAILER_PREFS_TYPE))
+#include <glade/glade.h>
+#include <gconf/gconf-client.h>
+
+/* Standard GObject macros */
+#define EM_TYPE_MAILER_PREFS \
+ (em_mailer_prefs_get_type ())
+#define EM_MAILER_PREFS(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), EM_TYPE_MAILER_PREFS, EMMailerPrefs))
+#define EM_MAILER_PREFS_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), EM_TYPE_MAILER_PREFS, EMMailerPrefsClass))
+#define EM_IS_MAILER_PREFS(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), EM_TYPE_MAILER_PREFS))
+#define EM_IS_MAILER_PREFS_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), EM_TYPE_MAILER_PREFS))
+#define EM_MAILER_PREFS_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), EM_TYPE_MAILER_PREFS))
+
+G_BEGIN_DECLS
typedef struct _EMMailerPrefs EMMailerPrefs;
typedef struct _EMMailerPrefsClass EMMailerPrefsClass;
@@ -63,103 +61,94 @@ struct _EMMailerPrefsHeader {
struct _EMMailerPrefs {
GtkVBox parent_object;
- GNOME_Evolution_Shell shell;
-
- struct _GladeXML *gui;
- struct _GConfClient *gconf;
+ GladeXML *gui;
+ GConfClient *gconf;
/* General tab */
/* Message Display */
- struct _GtkToggleButton *timeout_toggle;
- struct _GtkSpinButton *timeout;
- struct _GtkToggleButton *address_toggle;
- struct _GtkSpinButton *address_count;
- struct _GtkToggleButton *mlimit_toggle;
- struct _GtkSpinButton *mlimit_count;
- struct _GtkOptionMenu *charset;
- struct _GtkToggleButton *citation_highlight;
- struct _GtkColorButton *citation_color;
- struct _GtkToggleButton *enable_search_folders;
- struct _GtkToggleButton *magic_spacebar;
+ GtkToggleButton *timeout_toggle;
+ GtkSpinButton *timeout;
+ GtkToggleButton *address_toggle;
+ GtkSpinButton *address_count;
+ GtkToggleButton *mlimit_toggle;
+ GtkSpinButton *mlimit_count;
+ GtkOptionMenu *charset;
+ GtkToggleButton *citation_highlight;
+ GtkColorButton *citation_color;
+ GtkToggleButton *enable_search_folders;
+ GtkToggleButton *magic_spacebar;
/* Deleting Mail */
- struct _GtkToggleButton *empty_trash;
- struct _GtkOptionMenu *empty_trash_days;
- struct _GtkToggleButton *confirm_expunge;
+ GtkToggleButton *empty_trash;
+ GtkOptionMenu *empty_trash_days;
+ GtkToggleButton *confirm_expunge;
/* HTML Mail tab */
- struct _GtkFontButton *font_variable;
- struct _GtkFontButton *font_fixed;
- struct _GtkToggleButton *font_share;
+ GtkFontButton *font_variable;
+ GtkFontButton *font_fixed;
+ GtkToggleButton *font_share;
/* Loading Images */
- struct _GtkToggleButton *images_always;
- struct _GtkToggleButton *images_sometimes;
- struct _GtkToggleButton *images_never;
+ GtkToggleButton *images_always;
+ GtkToggleButton *images_sometimes;
+ GtkToggleButton *images_never;
- struct _GtkToggleButton *show_animated;
- struct _GtkToggleButton *autodetect_links;
- struct _GtkToggleButton *prompt_unwanted_html;
+ GtkToggleButton *show_animated;
+ GtkToggleButton *autodetect_links;
+ GtkToggleButton *prompt_unwanted_html;
/* Labels and Colours tab */
- struct _GtkWidget *label_add;
- struct _GtkWidget *label_edit;
- struct _GtkWidget *label_remove;
- struct _GtkWidget *label_tree;
- struct _GtkListStore *label_list_store;
+ GtkWidget *label_add;
+ GtkWidget *label_edit;
+ GtkWidget *label_remove;
+ GtkWidget *label_tree;
+ GtkListStore *label_list_store;
guint labels_change_notify_id; /* mail_config's notify id */
/* Headers tab */
- struct _GtkButton *add_header;
- struct _GtkButton *remove_header;
- struct _GtkEntry *entry_header;
- struct _GtkTreeView *header_list;
- struct _GtkListStore *header_list_store;
- struct _GtkToggleButton *photo_show;
- struct _GtkToggleButton *photo_local;
+ GtkButton *add_header;
+ GtkButton *remove_header;
+ GtkEntry *entry_header;
+ GtkTreeView *header_list;
+ GtkListStore *header_list_store;
+ GtkToggleButton *photo_show;
+ GtkToggleButton *photo_local;
/* Junk prefs */
- struct _GtkToggleButton *check_incoming;
- struct _GtkToggleButton *empty_junk;
- struct _GtkOptionMenu *empty_junk_days;
+ GtkToggleButton *check_incoming;
+ GtkToggleButton *empty_junk;
+ GtkOptionMenu *empty_junk_days;
- struct _GtkToggleButton *sa_local_tests_only;
- struct _GtkToggleButton *sa_use_daemon;
- struct _GtkComboBox *default_junk_plugin;
- struct _GtkLabel *plugin_status;
- struct _GtkImage *plugin_image;
-
- struct _GtkToggleButton *junk_header_check;
- struct _GtkTreeView *junk_header_tree;
- struct _GtkListStore *junk_header_list_store;
- struct _GtkButton *junk_header_add;
- struct _GtkButton *junk_header_remove;
- struct _GtkToggleButton *junk_book_lookup;
- struct _GtkToggleButton *junk_lookup_local_only;
+ GtkToggleButton *sa_local_tests_only;
+ GtkToggleButton *sa_use_daemon;
+ GtkComboBox *default_junk_plugin;
+ GtkLabel *plugin_status;
+ GtkImage *plugin_image;
+
+ GtkToggleButton *junk_header_check;
+ GtkTreeView *junk_header_tree;
+ GtkListStore *junk_header_list_store;
+ GtkButton *junk_header_add;
+ GtkButton *junk_header_remove;
+ GtkToggleButton *junk_book_lookup;
+ GtkToggleButton *junk_lookup_local_only;
};
struct _EMMailerPrefsClass {
GtkVBoxClass parent_class;
-
- /* signals */
-
};
-GType em_mailer_prefs_get_type (void);
-GtkWidget * create_combo_text_widget (void);
-
-struct _GtkWidget *em_mailer_prefs_new (void);
+GType em_mailer_prefs_get_type (void);
+GtkWidget * create_combo_text_widget (void);
-EMMailerPrefsHeader *em_mailer_prefs_header_from_xml(const char *xml);
-char *em_mailer_prefs_header_to_xml(EMMailerPrefsHeader *header);
-void em_mailer_prefs_header_free(EMMailerPrefsHeader *header);
+GtkWidget * em_mailer_prefs_new (void);
-/* needed by global config */
-#define EM_MAILER_PREFS_CONTROL_ID "OAFIID:GNOME_Evolution_Mail_MailerPrefs_ConfigControl:" BASE_VERSION
+EMMailerPrefsHeader *
+ em_mailer_prefs_header_from_xml (const gchar *xml);
+gchar * em_mailer_prefs_header_to_xml (EMMailerPrefsHeader *header);
+void em_mailer_prefs_header_free (EMMailerPrefsHeader *header);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+G_END_DECLS
-#endif /* __EM_MAILER_PREFS_H__ */
+#endif /* EM_MAILER_PREFS_H */
diff --git a/mail/em-network-prefs.h b/mail/em-network-prefs.h
index de0951714f..41b4539608 100644
--- a/mail/em-network-prefs.h
+++ b/mail/em-network-prefs.h
@@ -20,30 +20,37 @@
*
*/
-#ifndef __EM_NETWORK_PREFS_H__
-#define __EM_NETWORK_PREFS_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
+#ifndef EM_NETWORK_PREFS_H
+#define EM_NETWORK_PREFS_H
#include <gtk/gtk.h>
-
-#define EM_NETWORK_PREFS_TYPE (em_network_prefs_get_type ())
-#define EM_NETWORK_PREFS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EM_NETWORK_PREFS_TYPE, EMNetworkPrefs))
-#define EM_NETWORK_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), EM_NETWORK_PREFS_TYPE, EMNetworkPrefsClass))
-#define EM_IS_NETWORK_PREFS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EM_NETWORK_PREFS_TYPE))
-#define EM_IS_NETWORK_PREFS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EM_NETWORK_PREFS_TYPE))
+#include <glade/glade.h>
+#include <gconf/gconf-client.h>
+
+/* Standard GObject macros */
+#define EM_TYPE_NETWORK_PREFS \
+ (em_network_prefs_get_type ())
+#define EM_NETWORK_PREFS(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), EM_TYPE_NETWORK_PREFS, EMNetworkPrefs))
+#define EM_NETWORK_PREFS_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), EM_TYPE_NETWORK_PREFS, EMNetworkPrefsClass))
+#define EM_IS_NETWORK_PREFS(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), EM_TYPE_NETWORK_PREFS))
+#define EM_IS_NETWORK_PREFS_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), EM_TYPE_NETWORK_PREFS))
+#define EM_NETWORK_PREFS_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), EM_TYPE_NETWORK_PREFS, EMNetworkPrefsClass))
+
+G_BEGIN_DECLS
typedef struct _EMNetworkPrefs EMNetworkPrefs;
typedef struct _EMNetworkPrefsClass EMNetworkPrefsClass;
-struct _GtkToggleButton;
-struct _GtkEntry;
-struct _GladeXML;
-struct _GConfClient;
-
typedef enum {
NETWORK_PROXY_SYS_SETTINGS,
NETWORK_PROXY_DIRECT_CONNECTION,
@@ -51,60 +58,50 @@ typedef enum {
NETWORK_PROXY_AUTOCONFIG
} NetworkConfigProxyType;
-
struct _EMNetworkPrefs {
GtkVBox parent_object;
- struct _GConfClient *gconf;
+ GConfClient *gconf;
- struct _GladeXML *gui;
+ GladeXML *gui;
/* Default Behavior */
- struct _GtkToggleButton *sys_proxy;
- struct _GtkToggleButton *no_proxy;
- struct _GtkToggleButton *manual_proxy;
- struct _GtkToggleButton *auto_proxy;
- struct _GtkToggleButton *use_auth;
-
- struct _GtkEntry *http_host;
- struct _GtkEntry *https_host;
- struct _GtkEntry *socks_host;
- struct _GtkEntry *ignore_hosts;
- struct _GtkEntry *auto_proxy_url;
- struct _GtkEntry *auth_user;
- struct _GtkEntry *auth_pwd;
-
- struct _GtkLabel *lbl_http_host;
- struct _GtkLabel *lbl_http_port;
- struct _GtkLabel *lbl_https_host;
- struct _GtkLabel *lbl_https_port;
- struct _GtkLabel *lbl_socks_host;
- struct _GtkLabel *lbl_socks_port;
- struct _GtkLabel *lbl_ignore_hosts;
- struct _GtkLabel *lbl_auth_user;
- struct _GtkLabel *lbl_auth_pwd;
-
- struct _GtkSpinButton *http_port;
- struct _GtkSpinButton *https_port;
- struct _GtkSpinButton *socks_port;
+ GtkToggleButton *sys_proxy;
+ GtkToggleButton *no_proxy;
+ GtkToggleButton *manual_proxy;
+ GtkToggleButton *auto_proxy;
+ GtkToggleButton *use_auth;
+
+ GtkEntry *http_host;
+ GtkEntry *https_host;
+ GtkEntry *socks_host;
+ GtkEntry *ignore_hosts;
+ GtkEntry *auto_proxy_url;
+ GtkEntry *auth_user;
+ GtkEntry *auth_pwd;
+
+ GtkLabel *lbl_http_host;
+ GtkLabel *lbl_http_port;
+ GtkLabel *lbl_https_host;
+ GtkLabel *lbl_https_port;
+ GtkLabel *lbl_socks_host;
+ GtkLabel *lbl_socks_port;
+ GtkLabel *lbl_ignore_hosts;
+ GtkLabel *lbl_auth_user;
+ GtkLabel *lbl_auth_pwd;
+
+ GtkSpinButton *http_port;
+ GtkSpinButton *https_port;
+ GtkSpinButton *socks_port;
};
struct _EMNetworkPrefsClass {
GtkVBoxClass parent_class;
-
- /* signals */
-
};
-GType em_network_prefs_get_type (void);
-
-struct _GtkWidget *em_network_prefs_new (void);
-
-/* needed by global config */
-#define EM_NETWORK_PREFS_CONTROL_ID "OAFIID:GNOME_Evolution_Mail_NetworkPrefs_ConfigControl:" BASE_VERSION
+GType em_network_prefs_get_type (void);
+GtkWidget * em_network_prefs_new (void);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+G_END_DECLS
-#endif /* __EM_NETWORK_PREFS_H__ */
+#endif /* EM_NETWORK_PREFS_H */
diff --git a/mail/mail-config-factory.c b/mail/mail-config-factory.c
deleted file mode 100644
index 74c05ec8fc..0000000000
--- a/mail/mail-config-factory.c
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-
-#include "em-account-prefs.h"
-#include "em-composer-prefs.h"
-#include "em-mailer-prefs.h"
-#include "em-network-prefs.h"
-
-#include "mail-config-factory.h"
-
-#define CONFIG_CONTROL_FACTORY_ID "OAFIID:GNOME_Evolution_Mail_ConfigControlFactory:" BASE_VERSION
-
-BonoboObject *
-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;
- GtkWidget *prefs = NULL;
-
- if (!strcmp (component_id, EM_ACCOUNT_PREFS_CONTROL_ID)) {
- prefs = em_account_prefs_new (shell);
- } else if (!strcmp (component_id, EM_MAILER_PREFS_CONTROL_ID)) {
- prefs = em_mailer_prefs_new ();
- } else if (!strcmp (component_id, EM_COMPOSER_PREFS_CONTROL_ID)) {
- prefs = em_composer_prefs_new ();
- } else if (!strcmp (component_id, EM_NETWORK_PREFS_CONTROL_ID)) {
- prefs = em_network_prefs_new ();
- } else {
- g_return_val_if_reached(NULL);
- }
-
- gtk_widget_show_all (prefs);
-
- control = evolution_config_control_new (prefs);
-
- return BONOBO_OBJECT (control);
-}
diff --git a/mail/mail-config-factory.h b/mail/mail-config-factory.h
deleted file mode 100644
index f3a4b5fd29..0000000000
--- a/mail/mail-config-factory.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Jeffrey Stedfast <fejj@ximian.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifndef __MAIL_CONFIG_FACTORY_H__
-#define __MAIL_CONFIG_FACTORY_H__
-
-#ifdef __cplusplus
-extern "C" {
-#pragma }
-#endif /* __cplusplus */
-
-#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 /* __cplusplus */
-
-#endif /* __MAIL_CONFIG_FACTORY_H__ */