aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-06-18 21:34:33 +0800
committerMilan Crha <mcrha@redhat.com>2012-06-18 21:35:44 +0800
commit6c05b09be16ac8eceb17653c3c26c0c6f963ef10 (patch)
tree5bb22771cf05419f851373ee43b1ad39a0dcfeaa /mail
parente045e6f12324e1063a87488ac298fd23affea581 (diff)
downloadgsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar
gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.gz
gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.bz2
gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.lz
gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.xz
gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.tar.zst
gsoc2013-evolution-6c05b09be16ac8eceb17653c3c26c0c6f963ef10.zip
Do not call g_object_notify() when property didn't change
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-account-store.c3
-rw-r--r--mail/e-mail-browser.c3
-rw-r--r--mail/e-mail-config-auth-check.c3
-rw-r--r--mail/e-mail-config-confirm-page.c3
-rw-r--r--mail/e-mail-config-identity-page.c9
-rw-r--r--mail/e-mail-config-service-backend.c6
-rw-r--r--mail/e-mail-config-service-notebook.c3
-rw-r--r--mail/e-mail-config-service-page.c6
-rw-r--r--mail/e-mail-config-summary-page.c6
-rw-r--r--mail/e-mail-config-welcome-page.c3
-rw-r--r--mail/e-mail-display.c7
-rw-r--r--mail/e-mail-junk-options.c3
-rw-r--r--mail/e-mail-label-dialog.c3
-rw-r--r--mail/e-mail-reader.c8
-rw-r--r--mail/e-mail-tab-picker.c4
-rw-r--r--mail/e-mail-tab.c8
-rw-r--r--mail/e-mail-tag-editor.c7
-rw-r--r--mail/e-mail-view.c12
-rw-r--r--mail/em-folder-selection-button.c15
-rw-r--r--mail/em-folder-tree-model.c6
20 files changed, 107 insertions, 11 deletions
diff --git a/mail/e-mail-account-store.c b/mail/e-mail-account-store.c
index e22ed99274..c7afce32d4 100644
--- a/mail/e-mail-account-store.c
+++ b/mail/e-mail-account-store.c
@@ -1093,6 +1093,9 @@ e_mail_account_store_set_express_mode (EMailAccountStore *store,
{
g_return_if_fail (E_IS_MAIL_ACCOUNT_STORE (store));
+ if ((store->priv->express_mode ? 1 : 0) == (express_mode ? 1 : 0))
+ return;
+
store->priv->express_mode = express_mode;
g_object_notify (G_OBJECT (store), "express-mode");
diff --git a/mail/e-mail-browser.c b/mail/e-mail-browser.c
index 5b89154885..936b3b520f 100644
--- a/mail/e-mail-browser.c
+++ b/mail/e-mail-browser.c
@@ -985,6 +985,9 @@ e_mail_browser_set_show_deleted (EMailBrowser *browser,
{
g_return_if_fail (E_IS_MAIL_BROWSER (browser));
+ if ((browser->priv->show_deleted ? 1 : 0) == (show_deleted ? 1 : 0))
+ return;
+
browser->priv->show_deleted = show_deleted;
g_object_notify (G_OBJECT (browser), "show-deleted");
diff --git a/mail/e-mail-config-auth-check.c b/mail/e-mail-config-auth-check.c
index 22523e5af0..21e6633b76 100644
--- a/mail/e-mail-config-auth-check.c
+++ b/mail/e-mail-config-auth-check.c
@@ -438,6 +438,9 @@ e_mail_config_auth_check_set_active_mechanism (EMailConfigAuthCheck *auth_check,
{
g_return_if_fail (E_IS_MAIL_CONFIG_AUTH_CHECK (auth_check));
+ if (g_strcmp0 (auth_check->priv->active_mechanism, active_mechanism) == 0)
+ return;
+
g_free (auth_check->priv->active_mechanism);
auth_check->priv->active_mechanism = g_strdup (active_mechanism);
diff --git a/mail/e-mail-config-confirm-page.c b/mail/e-mail-config-confirm-page.c
index ac3585ad08..6d276263e4 100644
--- a/mail/e-mail-config-confirm-page.c
+++ b/mail/e-mail-config-confirm-page.c
@@ -197,6 +197,9 @@ e_mail_config_confirm_page_set_text (EMailConfigConfirmPage *page,
{
g_return_if_fail (E_IS_MAIL_CONFIG_CONFIRM_PAGE (page));
+ if (g_strcmp0 (page->priv->text, (text != NULL) ? text : "") == 0)
+ return;
+
g_free (page->priv->text);
page->priv->text = g_strdup ((text != NULL) ? text : "");
diff --git a/mail/e-mail-config-identity-page.c b/mail/e-mail-config-identity-page.c
index b42f0dd49f..055d449d4b 100644
--- a/mail/e-mail-config-identity-page.c
+++ b/mail/e-mail-config-identity-page.c
@@ -692,6 +692,9 @@ e_mail_config_identity_page_set_show_account_info (EMailConfigIdentityPage *page
{
g_return_if_fail (E_IS_MAIL_CONFIG_IDENTITY_PAGE (page));
+ if ((page->priv->show_account_info ? 1 : 0) == (show_account_info ? 1 : 0))
+ return;
+
page->priv->show_account_info = show_account_info;
g_object_notify (G_OBJECT (page), "show-account-info");
@@ -711,6 +714,9 @@ e_mail_config_identity_page_set_show_instructions (EMailConfigIdentityPage *page
{
g_return_if_fail (E_IS_MAIL_CONFIG_IDENTITY_PAGE (page));
+ if ((page->priv->show_instructions ? 1 : 0) == (show_instructions ? 1 : 0))
+ return;
+
page->priv->show_instructions = show_instructions;
g_object_notify (G_OBJECT (page), "show-instructions");
@@ -730,6 +736,9 @@ e_mail_config_identity_page_set_show_signatures (EMailConfigIdentityPage *page,
{
g_return_if_fail (E_IS_MAIL_CONFIG_IDENTITY_PAGE (page));
+ if ((page->priv->show_signatures ? 1 : 0) == (show_signatures ? 1 : 0))
+ return;
+
page->priv->show_signatures = show_signatures;
g_object_notify (G_OBJECT (page), "show-signatures");
diff --git a/mail/e-mail-config-service-backend.c b/mail/e-mail-config-service-backend.c
index 49019c5fb7..c6c42ae7f5 100644
--- a/mail/e-mail-config-service-backend.c
+++ b/mail/e-mail-config-service-backend.c
@@ -297,6 +297,9 @@ e_mail_config_service_backend_set_source (EMailConfigServiceBackend *backend,
{
g_return_if_fail (E_IS_MAIL_CONFIG_SERVICE_BACKEND (backend));
+ if (backend->priv->source == source)
+ return;
+
if (source != NULL) {
g_return_if_fail (E_IS_SOURCE (source));
g_object_ref (source);
@@ -324,6 +327,9 @@ e_mail_config_service_backend_set_collection (EMailConfigServiceBackend *backend
{
g_return_if_fail (E_IS_MAIL_CONFIG_SERVICE_BACKEND (backend));
+ if (backend->priv->collection == collection)
+ return;
+
if (collection != NULL) {
g_return_if_fail (E_IS_SOURCE (collection));
g_object_ref (collection);
diff --git a/mail/e-mail-config-service-notebook.c b/mail/e-mail-config-service-notebook.c
index 757cd902da..0043b2c812 100644
--- a/mail/e-mail-config-service-notebook.c
+++ b/mail/e-mail-config-service-notebook.c
@@ -350,6 +350,9 @@ e_mail_config_service_notebook_set_active_backend (EMailConfigServiceNotebook *n
{
g_return_if_fail (E_IS_MAIL_CONFIG_SERVICE_NOTEBOOK (notebook));
+ if (notebook->priv->active_backend == backend)
+ return;
+
if (backend != NULL) {
g_return_if_fail (E_IS_MAIL_CONFIG_SERVICE_BACKEND (backend));
g_object_ref (backend);
diff --git a/mail/e-mail-config-service-page.c b/mail/e-mail-config-service-page.c
index 5994ebc2bf..dc4eb805bf 100644
--- a/mail/e-mail-config-service-page.c
+++ b/mail/e-mail-config-service-page.c
@@ -823,6 +823,9 @@ e_mail_config_service_page_set_active_backend (EMailConfigServicePage *page,
{
g_return_if_fail (E_IS_MAIL_CONFIG_SERVICE_PAGE (page));
+ if (page->priv->active_backend == backend)
+ return;
+
if (backend != NULL) {
g_return_if_fail (E_IS_MAIL_CONFIG_SERVICE_BACKEND (backend));
g_object_ref (backend);
@@ -850,6 +853,9 @@ e_mail_config_service_page_set_email_address (EMailConfigServicePage *page,
{
g_return_if_fail (E_IS_MAIL_CONFIG_SERVICE_PAGE (page));
+ if (g_strcmp0 (page->priv->email_address, email_address) == 0)
+ return;
+
g_free (page->priv->email_address);
page->priv->email_address = g_strdup (email_address);
diff --git a/mail/e-mail-config-summary-page.c b/mail/e-mail-config-summary-page.c
index 03a9ed19b4..2da138ee4f 100644
--- a/mail/e-mail-config-summary-page.c
+++ b/mail/e-mail-config-summary-page.c
@@ -875,6 +875,9 @@ e_mail_config_summary_page_set_account_name (EMailConfigSummaryPage *page,
if (account_name == NULL)
account_name = "";
+ if (g_strcmp0 (page->priv->account_name, account_name) == 0)
+ return;
+
g_free (page->priv->account_name);
page->priv->account_name = g_strdup (account_name);
@@ -959,6 +962,9 @@ e_mail_config_summary_page_set_identity_source (EMailConfigSummaryPage *page,
{
g_return_if_fail (E_IS_MAIL_CONFIG_SUMMARY_PAGE (page));
+ if (page->priv->identity_source == identity_source)
+ return;
+
if (identity_source != NULL) {
g_return_if_fail (E_IS_SOURCE (identity_source));
g_object_ref (identity_source);
diff --git a/mail/e-mail-config-welcome-page.c b/mail/e-mail-config-welcome-page.c
index 905c42849c..9196bb8c2f 100644
--- a/mail/e-mail-config-welcome-page.c
+++ b/mail/e-mail-config-welcome-page.c
@@ -195,6 +195,9 @@ e_mail_config_welcome_page_set_text (EMailConfigWelcomePage *page,
{
g_return_if_fail (E_IS_MAIL_CONFIG_WELCOME_PAGE (page));
+ if (g_strcmp0 (page->priv->text, (text != NULL) ? text : "") == 0)
+ return;
+
g_free (page->priv->text);
page->priv->text = g_strdup ((text != NULL) ? text : "");
diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
index 1b4b284720..d3652c57c3 100644
--- a/mail/e-mail-display.c
+++ b/mail/e-mail-display.c
@@ -1575,6 +1575,9 @@ e_mail_display_set_parts_list (EMailDisplay *display,
{
g_return_if_fail (E_IS_MAIL_DISPLAY (display));
+ if (display->priv->part_list == part_list)
+ return;
+
if (part_list) {
g_return_if_fail (E_IS_MAIL_PART_LIST (part_list));
g_object_ref (part_list);
@@ -1602,7 +1605,7 @@ e_mail_display_set_headers_collapsable (EMailDisplay *display,
{
g_return_if_fail (E_IS_MAIL_DISPLAY (display));
- if (display->priv->headers_collapsable == collapsable)
+ if ((display->priv->headers_collapsable ? 1 : 0) == (collapsable ? 1 : 0))
return;
display->priv->headers_collapsable = collapsable;
@@ -1628,7 +1631,7 @@ e_mail_display_set_headers_collapsed (EMailDisplay *display,
{
g_return_if_fail (E_IS_MAIL_DISPLAY (display));
- if (display->priv->headers_collapsed == collapsed)
+ if ((display->priv->headers_collapsed ? 1 : 0) == (collapsed ? 1 : 0))
return;
display->priv->headers_collapsed = collapsed;
diff --git a/mail/e-mail-junk-options.c b/mail/e-mail-junk-options.c
index e2c670c688..34793dad6a 100644
--- a/mail/e-mail-junk-options.c
+++ b/mail/e-mail-junk-options.c
@@ -356,6 +356,9 @@ e_mail_junk_options_set_session (EMailJunkOptions *options,
{
g_return_if_fail (E_IS_MAIL_JUNK_OPTIONS (options));
+ if (options->priv->session == session)
+ return;
+
if (session != NULL) {
g_return_if_fail (E_IS_MAIL_SESSION (session));
g_object_ref (session);
diff --git a/mail/e-mail-label-dialog.c b/mail/e-mail-label-dialog.c
index 15222cc7b4..839cc75424 100644
--- a/mail/e-mail-label-dialog.c
+++ b/mail/e-mail-label-dialog.c
@@ -266,6 +266,9 @@ e_mail_label_dialog_set_label_name (EMailLabelDialog *dialog,
entry = GTK_ENTRY (dialog->priv->entry);
+ if (g_strcmp0 (gtk_entry_get_text (entry), label_name) == 0)
+ return;
+
gtk_entry_set_text (entry, label_name);
g_object_notify (G_OBJECT (dialog), "label-name");
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c
index c350b52dd3..5d1c36a0ba 100644
--- a/mail/e-mail-reader.c
+++ b/mail/e-mail-reader.c
@@ -4572,6 +4572,9 @@ e_mail_reader_set_forward_style (EMailReader *reader,
priv = E_MAIL_READER_GET_PRIVATE (reader);
+ if (priv->forward_style == style)
+ return;
+
priv->forward_style = style;
g_object_notify (G_OBJECT (reader), "forward-style");
@@ -4600,7 +4603,7 @@ e_mail_reader_set_group_by_threads (EMailReader *reader,
priv = E_MAIL_READER_GET_PRIVATE (reader);
- if (group_by_threads == priv->group_by_threads)
+ if ((group_by_threads ? 1 : 0) == (priv->group_by_threads ? 1 : 0))
return;
priv->group_by_threads = group_by_threads;
@@ -4635,6 +4638,9 @@ e_mail_reader_set_reply_style (EMailReader *reader,
priv = E_MAIL_READER_GET_PRIVATE (reader);
+ if (priv->reply_style == style)
+ return;
+
priv->reply_style = style;
g_object_notify (G_OBJECT (reader), "reply-style");
diff --git a/mail/e-mail-tab-picker.c b/mail/e-mail-tab-picker.c
index d2267dc142..c5751ca90f 100644
--- a/mail/e-mail-tab-picker.c
+++ b/mail/e-mail-tab-picker.c
@@ -1252,7 +1252,7 @@ e_mail_tab_picker_set_preview_mode (EMailTabPicker *picker,
EMailTabPickerPrivate *priv = picker->priv;
- if (priv->preview_mode == preview)
+ if ((priv->preview_mode ? 1 : 0) == (preview ? 1 : 0))
return;
priv->preview_mode = preview;
@@ -1333,7 +1333,7 @@ e_mail_tab_picker_enable_drop (EMailTabPicker *picker,
{
EMailTabPickerPrivate *priv = picker->priv;
- if (priv->drop_enabled == enable)
+ if ((priv->drop_enabled ? 1 : 0) == (enable ? 1 : 0))
return;
priv->drop_enabled = enable;
diff --git a/mail/e-mail-tab.c b/mail/e-mail-tab.c
index d79edf40e8..a2a80436d0 100644
--- a/mail/e-mail-tab.c
+++ b/mail/e-mail-tab.c
@@ -1459,7 +1459,7 @@ e_mail_tab_set_can_close (EMailTab *tab,
{
EMailTabPrivate *priv = tab->priv;
- if (priv->can_close == can_close)
+ if ((priv->can_close ? 1 : 0) == (can_close ? 1 : 0))
return;
priv->can_close = can_close;
@@ -1504,7 +1504,7 @@ e_mail_tab_set_docking (EMailTab *tab,
{
EMailTabPrivate *priv = tab->priv;
- if (priv->docking == docking)
+ if ((priv->docking ? 1 : 0) == (docking ? 1 : 0))
return;
priv->docking = docking;
@@ -1815,7 +1815,7 @@ e_mail_tab_set_private (EMailTab *tab,
{
EMailTabPrivate *priv = tab->priv;
- if (priv->private == private)
+ if ((priv->private ? 1 : 0) == (private ? 1 : 0))
return;
priv->private = private;
@@ -1840,7 +1840,7 @@ e_mail_tab_set_active (EMailTab *tab,
{
EMailTabPrivate *priv = tab->priv;
- if (priv->active == active)
+ if ((priv->active ? 1 : 0) == (active ? 1 : 0))
return;
priv->active = active;
diff --git a/mail/e-mail-tag-editor.c b/mail/e-mail-tag-editor.c
index 57db55a5db..da87b18320 100644
--- a/mail/e-mail-tag-editor.c
+++ b/mail/e-mail-tag-editor.c
@@ -382,7 +382,7 @@ e_mail_tag_editor_set_completed (EMailTagEditor *editor,
{
g_return_if_fail (E_IS_MAIL_TAG_EDITOR (editor));
- if (completed == editor->priv->completed)
+ if ((completed ? 1 : 0) == (editor->priv->completed ? 1 : 0))
return;
editor->priv->completed = completed;
@@ -406,6 +406,9 @@ e_mail_tag_editor_set_week_start_day (EMailTagEditor *editor,
g_return_if_fail (E_IS_MAIL_TAG_EDITOR (editor));
g_return_if_fail (week_start_day >= 0 && week_start_day < 7);
+ if (editor->priv->week_start_day == week_start_day)
+ return;
+
editor->priv->week_start_day = week_start_day;
g_object_notify (G_OBJECT (editor), "week-start-day");
@@ -425,7 +428,7 @@ e_mail_tag_editor_set_use_24_hour_format (EMailTagEditor *editor,
{
g_return_if_fail (E_IS_MAIL_TAG_EDITOR (editor));
- if (use_24_hour_format == editor->priv->use_24_hour_format)
+ if ((use_24_hour_format ? 1 : 0) == (editor->priv->use_24_hour_format ? 1 : 0))
return;
editor->priv->use_24_hour_format = use_24_hour_format;
diff --git a/mail/e-mail-view.c b/mail/e-mail-view.c
index 72884dcc4b..1410d15f4e 100644
--- a/mail/e-mail-view.c
+++ b/mail/e-mail-view.c
@@ -184,6 +184,9 @@ static void
mail_view_set_orientation (EMailView *view,
GtkOrientation orientation)
{
+ if (view->priv->orientation == orientation)
+ return;
+
view->priv->orientation = orientation;
g_object_notify (G_OBJECT (view), "orientation");
@@ -201,6 +204,9 @@ static void
mail_view_set_preview_visible (EMailView *view,
gboolean preview_visible)
{
+ if ((view->priv->preview_visible ? 1 : 0) == (preview_visible ? 1 : 0))
+ return;
+
view->priv->preview_visible = preview_visible;
g_object_notify (G_OBJECT (view), "preview-visible");
@@ -216,6 +222,9 @@ static void
mail_view_set_show_deleted (EMailView *view,
gboolean show_deleted)
{
+ if ((view->priv->show_deleted ? 1 : 0) == (show_deleted ? 1 : 0))
+ return;
+
view->priv->show_deleted = show_deleted;
g_object_notify (G_OBJECT (view), "show-deleted");
@@ -442,6 +451,9 @@ e_mail_view_set_previous_view (EMailView *view,
{
g_return_if_fail (E_IS_MAIL_VIEW (view));
+ if (view->priv->previous_view == previous_view)
+ return;
+
if (previous_view != NULL) {
g_return_if_fail (E_IS_MAIL_VIEW (previous_view));
g_object_ref (previous_view);
diff --git a/mail/em-folder-selection-button.c b/mail/em-folder-selection-button.c
index fb4e27d83b..bcbcd722e0 100644
--- a/mail/em-folder-selection-button.c
+++ b/mail/em-folder-selection-button.c
@@ -437,6 +437,9 @@ em_folder_selection_button_set_session (EMFolderSelectionButton *button,
{
g_return_if_fail (EM_IS_FOLDER_SELECTION_BUTTON (button));
+ if (button->priv->session == session)
+ return;
+
if (session != NULL) {
g_return_if_fail (E_IS_MAIL_SESSION (session));
g_object_ref (session);
@@ -464,6 +467,9 @@ em_folder_selection_button_set_caption (EMFolderSelectionButton *button,
{
g_return_if_fail (EM_IS_FOLDER_SELECTION_BUTTON (button));
+ if (g_strcmp0 (button->priv->caption, caption) == 0)
+ return;
+
g_free (button->priv->caption);
button->priv->caption = g_strdup (caption);
@@ -488,6 +494,9 @@ em_folder_selection_button_set_folder_uri (EMFolderSelectionButton *button,
if (folder_uri != NULL && *folder_uri == '\0')
folder_uri = NULL;
+ if (g_strcmp0 (button->priv->folder_uri, folder_uri) == 0)
+ return;
+
g_free (button->priv->folder_uri);
button->priv->folder_uri = g_strdup (folder_uri);
@@ -510,6 +519,9 @@ em_folder_selection_button_set_store (EMFolderSelectionButton *button,
{
g_return_if_fail (EM_IS_FOLDER_SELECTION_BUTTON (button));
+ if (button->priv->store == store)
+ return;
+
if (store != NULL) {
g_return_if_fail (CAMEL_IS_STORE (store));
g_object_ref (store);
@@ -537,6 +549,9 @@ em_folder_selection_button_set_title (EMFolderSelectionButton *button,
{
g_return_if_fail (EM_IS_FOLDER_SELECTION_BUTTON (button));
+ if (g_strcmp0 (button->priv->title, title) == 0)
+ return;
+
g_free (button->priv->title);
button->priv->title = g_strdup (title);
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index b264beef31..f6a16d842a 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -515,6 +515,9 @@ em_folder_tree_model_set_selection (EMFolderTreeModel *model,
if (selection != NULL)
g_return_if_fail (GTK_IS_TREE_SELECTION (selection));
+ if (model->priv->selection == selection)
+ return;
+
if (model->priv->selection != NULL) {
g_object_weak_unref (
G_OBJECT (model->priv->selection), (GWeakNotify)
@@ -546,6 +549,9 @@ em_folder_tree_model_set_session (EMFolderTreeModel *model,
{
g_return_if_fail (EM_IS_FOLDER_TREE_MODEL (model));
+ if (model->priv->session == session)
+ return;
+
if (session != NULL) {
g_return_if_fail (E_IS_MAIL_SESSION (session));
g_object_ref (session);