aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-label-list-store.c30
-rw-r--r--mail/e-mail-session.c8
-rw-r--r--mail/em-account-editor.c63
-rw-r--r--mail/em-config.c1
-rw-r--r--mail/em-subscription-editor.c45
-rw-r--r--mail/mail-config.c20
6 files changed, 102 insertions, 65 deletions
diff --git a/mail/e-mail-label-list-store.c b/mail/e-mail-label-list-store.c
index 7e8c6f221a..bc9cb5ab3e 100644
--- a/mail/e-mail-label-list-store.c
+++ b/mail/e-mail-label-list-store.c
@@ -167,32 +167,43 @@ mail_label_list_store_get_stock_id (EMailLabelListStore *store,
}
static void
-mail_label_list_store_finalize (GObject *object)
+mail_label_list_store_dispose (GObject *object)
{
EMailLabelListStorePrivate *priv;
priv = E_MAIL_LABEL_LIST_STORE_GET_PRIVATE (object);
- g_hash_table_destroy (priv->tag_index);
-
if (priv->mail_settings != NULL) {
g_object_unref (priv->mail_settings);
priv->mail_settings = NULL;
}
+ /* Chain up to parent's dispose() method. */
+ G_OBJECT_CLASS (e_mail_label_list_store_parent_class)->
+ dispose (object);
+}
+
+static void
+mail_label_list_store_finalize (GObject *object)
+{
+ EMailLabelListStorePrivate *priv;
+
+ priv = E_MAIL_LABEL_LIST_STORE_GET_PRIVATE (object);
+
+ g_hash_table_destroy (priv->tag_index);
+
/* Chain up to parent's finalize() method. */
G_OBJECT_CLASS (e_mail_label_list_store_parent_class)->
finalize (object);
}
-
static void labels_settings_changed_cb (GSettings *settings, const gchar *key, gpointer user_data);
static void
labels_model_changed_cb (GtkTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- gpointer user_data)
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer user_data)
{
EMailLabelListStore *store;
GPtrArray *array;
@@ -228,8 +239,8 @@ labels_model_changed_cb (GtkTreeModel *model,
static void
labels_settings_changed_cb (GSettings *settings,
- const gchar *key,
- gpointer user_data)
+ const gchar *key,
+ gpointer user_data)
{
EMailLabelListStore *store;
gchar **strv;
@@ -326,6 +337,7 @@ e_mail_label_list_store_class_init (EMailLabelListStoreClass *class)
g_type_class_add_private (class, sizeof (EMailLabelListStorePrivate));
object_class = G_OBJECT_CLASS (class);
+ object_class->dispose = mail_label_list_store_dispose;
object_class->finalize = mail_label_list_store_finalize;
object_class->constructed = mail_label_list_store_constructed;
diff --git a/mail/e-mail-session.c b/mail/e-mail-session.c
index 1169b1d461..03f4961206 100644
--- a/mail/e-mail-session.c
+++ b/mail/e-mail-session.c
@@ -483,7 +483,7 @@ mail_session_make_key (CamelService *service,
static void
mail_session_check_junk_notify (GSettings *settings,
- const gchar *key,
+ const gchar *key,
CamelSession *session)
{
if (strcmp (key, "junk-check-incoming") == 0)
@@ -1089,9 +1089,9 @@ mail_session_forward_to (CamelSession *session,
static void
mail_session_get_socks_proxy (CamelSession *session,
- const gchar *for_host,
- gchar **host_ret,
- gint *port_ret)
+ const gchar *for_host,
+ gchar **host_ret,
+ gint *port_ret)
{
EMailSession *mail_session;
gchar *uri;
diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c
index 2036025ce3..6bd96ef299 100644
--- a/mail/em-account-editor.c
+++ b/mail/em-account-editor.c
@@ -3786,8 +3786,12 @@ emae_defaults_page (EConfig *ec,
priv->trash_folder_button, "sensitive",
G_BINDING_SYNC_CREATE);
- pspec = !settings ? NULL : g_object_class_find_property (
- G_OBJECT_GET_CLASS (settings), "use-real-trash-path");
+ if (settings != NULL)
+ pspec = g_object_class_find_property (
+ G_OBJECT_GET_CLASS (settings),
+ "use-real-trash-path");
+ else
+ pspec = NULL;
if (pspec != NULL)
g_object_bind_property (
@@ -3796,12 +3800,20 @@ emae_defaults_page (EConfig *ec,
G_BINDING_BIDIRECTIONAL |
G_BINDING_SYNC_CREATE);
- pspec = !settings ? NULL : g_object_class_find_property (
- G_OBJECT_GET_CLASS (settings), "real-trash-path");
+ if (settings != NULL)
+ pspec = g_object_class_find_property (
+ G_OBJECT_GET_CLASS (settings),
+ "real-trash-path");
+ else
+ pspec = NULL;
if (pspec != NULL) {
- set_real_folder_path (priv->trash_folder_button, settings, "real-trash-path", account);
- g_signal_connect (priv->trash_folder_button, "notify::folder-uri", G_CALLBACK (update_real_folder_cb), emae);
+ set_real_folder_path (
+ priv->trash_folder_button,
+ settings, "real-trash-path", account);
+ g_signal_connect (
+ priv->trash_folder_button, "notify::folder-uri",
+ G_CALLBACK (update_real_folder_cb), emae);
}
flags = CAMEL_PROVIDER_ALLOW_REAL_TRASH_FOLDER;
@@ -3832,8 +3844,12 @@ emae_defaults_page (EConfig *ec,
priv->junk_folder_button, "sensitive",
G_BINDING_SYNC_CREATE);
- pspec = !settings ? NULL : g_object_class_find_property (
- G_OBJECT_GET_CLASS (settings), "use-real-junk-path");
+ if (settings != NULL)
+ pspec = g_object_class_find_property (
+ G_OBJECT_GET_CLASS (settings),
+ "use-real-junk-path");
+ else
+ pspec = NULL;
if (pspec != NULL)
g_object_bind_property (
@@ -3842,12 +3858,20 @@ emae_defaults_page (EConfig *ec,
G_BINDING_BIDIRECTIONAL |
G_BINDING_SYNC_CREATE);
- pspec = !settings ? NULL : g_object_class_find_property (
- G_OBJECT_GET_CLASS (settings), "real-junk-path");
+ if (settings != NULL)
+ pspec = g_object_class_find_property (
+ G_OBJECT_GET_CLASS (settings),
+ "real-junk-path");
+ else
+ pspec = NULL;
if (pspec != NULL) {
- set_real_folder_path (priv->junk_folder_button, settings, "real-junk-path", account);
- g_signal_connect (priv->junk_folder_button, "notify::folder-uri", G_CALLBACK (update_real_folder_cb), emae);
+ set_real_folder_path (
+ priv->junk_folder_button,
+ settings, "real-junk-path", account);
+ g_signal_connect (
+ priv->junk_folder_button, "notify::folder-uri",
+ G_CALLBACK (update_real_folder_cb), emae);
}
flags = CAMEL_PROVIDER_ALLOW_REAL_JUNK_FOLDER;
@@ -3861,7 +3885,9 @@ emae_defaults_page (EConfig *ec,
/* Special Folders "Reset Defaults" button */
priv->restore_folders_button = (GtkButton *)e_builder_get_widget (builder, "default_folders_button");
- g_signal_connect (priv->restore_folders_button, "clicked", G_CALLBACK (default_folders_clicked), emae);
+ g_signal_connect (
+ priv->restore_folders_button, "clicked",
+ G_CALLBACK (default_folders_clicked), emae);
/* Always Cc/Bcc */
emae_account_toggle (emae, "always_cc", E_ACCOUNT_CC_ALWAYS, builder);
@@ -3869,12 +3895,13 @@ emae_defaults_page (EConfig *ec,
emae_account_toggle (emae, "always_bcc", E_ACCOUNT_BCC_ALWAYS, builder);
emae_account_entry (emae, "bcc_addrs", E_ACCOUNT_BCC_ADDRS, builder);
- gtk_widget_set_sensitive ( (GtkWidget *) priv->sent_folder_button,
- (provider ? !(provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER): TRUE)
- );
+ gtk_widget_set_sensitive (
+ GTK_WIDGET (priv->sent_folder_button),
+ (provider ? !(provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER) : TRUE));
- gtk_widget_set_sensitive ((GtkWidget *) priv->restore_folders_button,
- (provider && !(provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER)));
+ gtk_widget_set_sensitive (
+ GTK_WIDGET (priv->restore_folders_button),
+ (provider && !(provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER)));
/* Receipt policy */
emae_setup_receipt_policy (emae, builder);
diff --git a/mail/em-config.c b/mail/em-config.c
index 6a133f1c56..352e16b4b1 100644
--- a/mail/em-config.c
+++ b/mail/em-config.c
@@ -121,7 +121,6 @@ em_config_class_init (EMConfigClass *class)
{
EConfigClass *config_class;
-
config_class = E_CONFIG_CLASS (class);
config_class->set_target = em_config_set_target;
config_class->target_free = em_config_target_free;
diff --git a/mail/em-subscription-editor.c b/mail/em-subscription-editor.c
index d92713f8be..1d201f5d40 100644
--- a/mail/em-subscription-editor.c
+++ b/mail/em-subscription-editor.c
@@ -374,10 +374,9 @@ subscription_editor_subscribe_folder_done (CamelSubscribable *subscribable,
gtk_widget_grab_focus (GTK_WIDGET (tree_view));
}
-
static void
subscription_editor_subscribe_many (EMSubscriptionEditor *editor,
- GSList *async_datas)
+ GSList *async_datas)
{
AsyncData *async_data;
AsyncContext *context;
@@ -499,10 +498,9 @@ subscription_editor_unsubscribe_folder_done (CamelSubscribable *subscribable,
gtk_widget_grab_focus (GTK_WIDGET (tree_view));
}
-
static void
subscription_editor_unsubscribe_many (EMSubscriptionEditor *editor,
- GSList *async_datas)
+ GSList *async_datas)
{
AsyncData *async_data;
AsyncContext *context;
@@ -552,9 +550,9 @@ subscription_editor_unsubscribe_many (EMSubscriptionEditor *editor,
static GtkWidget *
subscription_editor_create_menu_item (const gchar *label,
- gboolean sensitive,
- GCallback activate_cb,
- EMSubscriptionEditor *editor)
+ gboolean sensitive,
+ GCallback activate_cb,
+ EMSubscriptionEditor *editor)
{
GtkWidget *item;
@@ -570,10 +568,10 @@ subscription_editor_create_menu_item (const gchar *label,
static void
position_below_widget_cb (GtkMenu *menu,
- gint *x,
- gint *y,
- gboolean *push_in,
- gpointer under_widget)
+ gint *x,
+ gint *y,
+ gboolean *push_in,
+ gpointer under_widget)
{
GtkRequisition menu_requisition;
GtkTextDirection direction;
@@ -611,9 +609,9 @@ position_below_widget_cb (GtkMenu *menu,
static AsyncData *
subscription_editor_async_data_from_iter (GtkTreeView *tree_view,
- GtkTreeModel *model,
- GtkTreeIter *iter,
- gboolean *is_expanded)
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ gboolean *is_expanded)
{
AsyncData *data;
CamelFolderInfo *folder_info = NULL;
@@ -650,7 +648,8 @@ typedef enum {
} EPickMode;
static gboolean
-can_pick_folder_info (CamelFolderInfo *fi, EPickMode mode)
+can_pick_folder_info (CamelFolderInfo *fi,
+ EPickMode mode)
{
if (!FOLDER_CAN_SELECT (fi))
return FALSE;
@@ -670,9 +669,9 @@ struct PickAllData {
static gboolean
pick_all_cb (GtkTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- gpointer user_data)
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer user_data)
{
struct PickAllData *data = user_data;
AsyncData *async_data;
@@ -696,13 +695,13 @@ pick_all_cb (GtkTreeModel *model,
}
/* skip_folder_infos contains CamelFolderInfo-s to skip;
- these should come from the tree view; can be NULL
- to include everything.
+ * these should come from the tree view; can be NULL
+ * to include everything.
*/
static GSList *
subscription_editor_pick_all (EMSubscriptionEditor *editor,
- EPickMode mode,
- GHashTable *skip_folder_infos)
+ EPickMode mode,
+ GHashTable *skip_folder_infos)
{
GtkTreeView *tree_view;
GtkTreeModel *tree_model;
@@ -723,7 +722,7 @@ subscription_editor_pick_all (EMSubscriptionEditor *editor,
static GSList *
subscription_editor_pick_shown (EMSubscriptionEditor *editor,
- EPickMode mode)
+ EPickMode mode)
{
GtkTreeView *tree_view;
GtkTreeModel *tree_model;
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 10b0f70c4d..bbad256d2f 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -58,8 +58,8 @@ static GSettings *mail_settings = NULL;
static void
settings_outlook_filenames_changed (GSettings *settings,
- const gchar *key,
- gpointer user_data)
+ const gchar *key,
+ gpointer user_data)
{
/* pass option to the camel */
if (g_settings_get_boolean (settings, key))
@@ -70,8 +70,8 @@ settings_outlook_filenames_changed (GSettings *settings,
static void
settings_jh_headers_changed (GSettings *settings,
- const gchar *key,
- EMailSession *session)
+ const gchar *key,
+ EMailSession *session)
{
GSList *node;
GPtrArray *name, *value;
@@ -110,8 +110,8 @@ settings_jh_headers_changed (GSettings *settings,
static void
settings_jh_check_changed (GSettings *settings,
- const gchar *key,
- EMailSession *session)
+ const gchar *key,
+ EMailSession *session)
{
config->jh_check = g_settings_get_boolean (settings, "junk-check-custom-header");
if (!config->jh_check) {
@@ -124,16 +124,16 @@ settings_jh_check_changed (GSettings *settings,
static void
settings_bool_value_changed (GSettings *settings,
- const gchar *key,
- gboolean *save_location)
+ const gchar *key,
+ gboolean *save_location)
{
*save_location = g_settings_get_boolean (settings, key);
}
static void
settings_int_value_changed (GSettings *settings,
- const gchar *key,
- gint *save_location)
+ const gchar *key,
+ gint *save_location)
{
*save_location = g_settings_get_int (settings, key);
}