aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@gnome-db.org>2011-10-10 18:50:18 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-10-10 18:50:18 +0800
commit56a166bb42bd55216a489c0b850ddd6bca2a3cd5 (patch)
tree3f87cf07fd6098ab2700c56d71d97686c5e5bc71 /modules
parent8fd93c9042bb30e53ce88303f8a0789a6ca688eb (diff)
parent6d5db4c7cd468d424ea8628344c5a1bba6fc3d7c (diff)
downloadgsoc2013-evolution-56a166bb42bd55216a489c0b850ddd6bca2a3cd5.tar
gsoc2013-evolution-56a166bb42bd55216a489c0b850ddd6bca2a3cd5.tar.gz
gsoc2013-evolution-56a166bb42bd55216a489c0b850ddd6bca2a3cd5.tar.bz2
gsoc2013-evolution-56a166bb42bd55216a489c0b850ddd6bca2a3cd5.tar.lz
gsoc2013-evolution-56a166bb42bd55216a489c0b850ddd6bca2a3cd5.tar.xz
gsoc2013-evolution-56a166bb42bd55216a489c0b850ddd6bca2a3cd5.tar.zst
gsoc2013-evolution-56a166bb42bd55216a489c0b850ddd6bca2a3cd5.zip
Merge branch 'master' into wip/gsettings
Diffstat (limited to 'modules')
-rw-r--r--modules/addressbook/apps_evolution_addressbook.schemas.in12
-rw-r--r--modules/addressbook/autocompletion-config.c12
-rw-r--r--modules/addressbook/e-book-shell-backend.c8
-rw-r--r--modules/addressbook/e-book-shell-settings.c4
-rw-r--r--modules/calendar/e-cal-shell-backend.c21
-rw-r--r--modules/calendar/e-memo-shell-backend.c8
-rw-r--r--modules/calendar/e-task-shell-backend.c8
-rw-r--r--modules/composer-autosave/e-autosave-utils.c21
-rw-r--r--modules/composer-autosave/e-composer-registry.c10
-rw-r--r--modules/mail/e-mail-shell-backend.c11
-rw-r--r--modules/mail/e-mail-shell-view-private.c10
-rw-r--r--modules/mail/em-composer-prefs.c4
-rw-r--r--modules/offline-alert/evolution-offline-alert.c13
13 files changed, 84 insertions, 58 deletions
diff --git a/modules/addressbook/apps_evolution_addressbook.schemas.in b/modules/addressbook/apps_evolution_addressbook.schemas.in
index a6506d7a78..cf9f098e90 100644
--- a/modules/addressbook/apps_evolution_addressbook.schemas.in
+++ b/modules/addressbook/apps_evolution_addressbook.schemas.in
@@ -139,5 +139,17 @@
</locale>
</schema>
+ <schema>
+ <key>/schemas/apps/evolution/addressbook/display/address_formatting</key>
+ <applyto>/apps/evolution/addressbook/display/address_formatting</applyto>
+ <owner>evolution-addressbook</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>Enable address formatting</short>
+ <long>Whether addresses should be formatted according to standard in their destination country.</long>
+ </locale>
+ </schema>
+
</schemalist>
</gconfschemafile>
diff --git a/modules/addressbook/autocompletion-config.c b/modules/addressbook/autocompletion-config.c
index 020ad1dc81..be9ddcc427 100644
--- a/modules/addressbook/autocompletion-config.c
+++ b/modules/addressbook/autocompletion-config.c
@@ -194,6 +194,18 @@ acc_get_general_page (EConfig *ec,
DTFormatKindDateTime, _("_Table column:"));
gtk_widget_show (widget);
+ itembox = add_section (vbox, _("Address formatting"), FALSE);
+
+ widget = gtk_check_button_new_with_label (
+ _("_Format address according to standard of its destination country"));
+ g_object_bind_property (
+ shell_settings, "enable-address-formatting",
+ widget, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
+ gtk_box_pack_start (GTK_BOX (itembox), widget, FALSE, FALSE, 0);
+ gtk_widget_show (widget);
+
itembox = add_section (vbox, _("Autocompletion"), TRUE);
widget = gtk_check_button_new_with_mnemonic (
diff --git a/modules/addressbook/e-book-shell-backend.c b/modules/addressbook/e-book-shell-backend.c
index c52b39b9fa..92341e4a3f 100644
--- a/modules/addressbook/e-book-shell-backend.c
+++ b/modules/addressbook/e-book-shell-backend.c
@@ -440,8 +440,8 @@ book_shell_backend_handle_uri_cb (EShellBackend *shell_backend,
}
static void
-book_shell_backend_window_created_cb (EShellBackend *shell_backend,
- GtkWindow *window)
+book_shell_backend_window_added_cb (EShellBackend *shell_backend,
+ GtkWindow *window)
{
const gchar *backend_name;
@@ -525,8 +525,8 @@ book_shell_backend_constructed (GObject *object)
shell_backend);
g_signal_connect_swapped (
- shell, "window-created",
- G_CALLBACK (book_shell_backend_window_created_cb),
+ shell, "window-added",
+ G_CALLBACK (book_shell_backend_window_added_cb),
shell_backend);
e_book_shell_backend_init_settings (shell);
diff --git a/modules/addressbook/e-book-shell-settings.c b/modules/addressbook/e-book-shell-settings.c
index 6be121d2c2..ae2e4f0adf 100644
--- a/modules/addressbook/e-book-shell-settings.c
+++ b/modules/addressbook/e-book-shell-settings.c
@@ -35,4 +35,8 @@ e_book_shell_backend_init_settings (EShell *shell)
e_shell_settings_install_property_for_key (
"book-primary-selection",
"/apps/evolution/addressbook/display/primary_addressbook");
+
+ e_shell_settings_install_property_for_key (
+ "enable-address-formatting",
+ "/apps/evolution/addressbook/display/address_formatting");
}
diff --git a/modules/calendar/e-cal-shell-backend.c b/modules/calendar/e-cal-shell-backend.c
index 36af9fd827..3ecb6bfb84 100644
--- a/modules/calendar/e-cal-shell-backend.c
+++ b/modules/calendar/e-cal-shell-backend.c
@@ -699,8 +699,8 @@ exit:
}
static void
-cal_shell_backend_window_created_cb (EShellBackend *shell_backend,
- GtkWindow *window)
+cal_shell_backend_window_added_cb (EShellBackend *shell_backend,
+ GtkWindow *window)
{
const gchar *backend_name;
@@ -770,8 +770,8 @@ cal_shell_backend_constructed (GObject *object)
shell_backend);
g_signal_connect_swapped (
- shell, "window-created",
- G_CALLBACK (cal_shell_backend_window_created_cb),
+ shell, "window-added",
+ G_CALLBACK (cal_shell_backend_window_added_cb),
shell_backend);
cal_shell_backend_init_importers ();
@@ -953,18 +953,21 @@ e_cal_shell_backend_open_date_range (ECalShellBackend *cal_shell_backend,
EShellBackend *shell_backend;
EShellSidebar *shell_sidebar;
GtkWidget *shell_window = NULL;
+ GtkApplication *application;
ECalendar *navigator;
- GList *watched_windows;
+ GList *list;
g_return_if_fail (E_IS_CAL_SHELL_BACKEND (cal_shell_backend));
shell_backend = E_SHELL_BACKEND (cal_shell_backend);
shell = e_shell_backend_get_shell (shell_backend);
- watched_windows = e_shell_get_watched_windows (shell);
+
+ application = GTK_APPLICATION (shell);
+ list = gtk_application_get_windows (application);
/* Try to find an EShellWindow already in calendar view. */
- while (watched_windows != NULL) {
- GtkWidget *window = GTK_WIDGET (watched_windows->data);
+ while (list != NULL) {
+ GtkWidget *window = GTK_WIDGET (list->data);
if (E_IS_SHELL_WINDOW (window)) {
const gchar *active_view;
@@ -978,7 +981,7 @@ e_cal_shell_backend_open_date_range (ECalShellBackend *cal_shell_backend,
}
}
- watched_windows = g_list_next (watched_windows);
+ list = g_list_next (list);
}
/* Otherwise create a new EShellWindow in calendar view. */
diff --git a/modules/calendar/e-memo-shell-backend.c b/modules/calendar/e-memo-shell-backend.c
index 5e24425678..b374afdced 100644
--- a/modules/calendar/e-memo-shell-backend.c
+++ b/modules/calendar/e-memo-shell-backend.c
@@ -485,8 +485,8 @@ exit:
}
static void
-memo_shell_backend_window_created_cb (EShellBackend *shell_backend,
- GtkWindow *window)
+memo_shell_backend_window_added_cb (EShellBackend *shell_backend,
+ GtkWindow *window)
{
const gchar *module_name;
@@ -555,8 +555,8 @@ memo_shell_backend_constructed (GObject *object)
shell_backend);
g_signal_connect_swapped (
- shell, "window-created",
- G_CALLBACK (memo_shell_backend_window_created_cb),
+ shell, "window-added",
+ G_CALLBACK (memo_shell_backend_window_added_cb),
shell_backend);
/* Chain up to parent's constructed() method. */
diff --git a/modules/calendar/e-task-shell-backend.c b/modules/calendar/e-task-shell-backend.c
index 0236a1227e..19e84a6764 100644
--- a/modules/calendar/e-task-shell-backend.c
+++ b/modules/calendar/e-task-shell-backend.c
@@ -490,8 +490,8 @@ exit:
}
static void
-task_shell_backend_window_created_cb (EShellBackend *shell_backend,
- GtkWindow *window)
+task_shell_backend_window_added_cb (EShellBackend *shell_backend,
+ GtkWindow *window)
{
const gchar *module_name;
@@ -560,8 +560,8 @@ task_shell_backend_constructed (GObject *object)
shell_backend);
g_signal_connect_swapped (
- shell, "window-created",
- G_CALLBACK (task_shell_backend_window_created_cb),
+ shell, "window-added",
+ G_CALLBACK (task_shell_backend_window_added_cb),
shell_backend);
/* Chain up to parent's constructed() method. */
diff --git a/modules/composer-autosave/e-autosave-utils.c b/modules/composer-autosave/e-autosave-utils.c
index 9c5eaa8236..8d03aaaecc 100644
--- a/modules/composer-autosave/e-autosave-utils.c
+++ b/modules/composer-autosave/e-autosave-utils.c
@@ -137,9 +137,8 @@ load_snapshot_loaded_cb (GFile *snapshot_file,
if (error != NULL) {
g_warn_if_fail (contents == NULL);
- g_simple_async_result_set_from_error (simple, error);
+ g_simple_async_result_take_error (simple, error);
g_simple_async_result_complete (simple);
- g_error_free (error);
return;
}
@@ -154,10 +153,9 @@ load_snapshot_loaded_cb (GFile *snapshot_file,
g_free (contents);
if (error != NULL) {
- g_simple_async_result_set_from_error (simple, error);
+ g_simple_async_result_take_error (simple, error);
g_simple_async_result_complete (simple);
g_object_unref (message);
- g_error_free (error);
return;
}
@@ -192,10 +190,8 @@ save_snapshot_splice_cb (GOutputStream *output_stream,
g_output_stream_splice_finish (output_stream, result, &error);
- if (error != NULL) {
- g_simple_async_result_set_from_error (simple, error);
- g_error_free (error);
- }
+ if (error != NULL)
+ g_simple_async_result_take_error (simple, error);
g_simple_async_result_complete (simple);
g_object_unref (simple);
@@ -220,10 +216,9 @@ save_snapshot_get_message_cb (EMsgComposer *composer,
if (error != NULL) {
g_warn_if_fail (message == NULL);
- g_simple_async_result_set_from_error (simple, error);
+ g_simple_async_result_take_error (simple, error);
g_simple_async_result_complete (simple);
g_object_unref (simple);
- g_error_free (error);
return;
}
@@ -281,10 +276,9 @@ save_snapshot_replace_cb (GFile *snapshot_file,
if (error != NULL) {
g_warn_if_fail (output_stream == NULL);
- g_simple_async_result_set_from_error (simple, error);
+ g_simple_async_result_take_error (simple, error);
g_simple_async_result_complete (simple);
g_object_unref (simple);
- g_error_free (error);
return;
}
@@ -480,10 +474,9 @@ e_composer_save_snapshot (EMsgComposer *composer,
if (error != NULL) {
g_warn_if_fail (snapshot_file == NULL);
- g_simple_async_result_set_from_error (simple, error);
+ g_simple_async_result_take_error (simple, error);
g_simple_async_result_complete (simple);
g_object_unref (simple);
- g_error_free (error);
return;
}
diff --git a/modules/composer-autosave/e-composer-registry.c b/modules/composer-autosave/e-composer-registry.c
index 9fcba43ff9..3b69e166a7 100644
--- a/modules/composer-autosave/e-composer-registry.c
+++ b/modules/composer-autosave/e-composer-registry.c
@@ -149,9 +149,9 @@ composer_registry_notify_cb (EComposerRegistry *registry,
}
static void
-composer_registry_window_created_cb (EShell *shell,
- GtkWindow *window,
- EComposerRegistry *registry)
+composer_registry_window_added_cb (GtkApplication *application,
+ GtkWindow *window,
+ EComposerRegistry *registry)
{
/* Offer to restore any orphaned auto-save files from the
* previous session once the first EShellWindow is mapped. */
@@ -201,8 +201,8 @@ composer_registry_constructed (GObject *object)
/* Listen for new watched windows. */
g_signal_connect (
- extensible, "window-created",
- G_CALLBACK (composer_registry_window_created_cb),
+ extensible, "window-added",
+ G_CALLBACK (composer_registry_window_added_cb),
object);
}
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index ad572f1421..9067437a71 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -303,10 +303,11 @@ mail_shell_backend_window_weak_notify_cb (EShell *shell,
}
static void
-mail_shell_backend_window_created_cb (EShell *shell,
- GtkWindow *window,
- EShellBackend *shell_backend)
+mail_shell_backend_window_added_cb (GtkApplication *application,
+ GtkWindow *window,
+ EShellBackend *shell_backend)
{
+ EShell *shell = E_SHELL (application);
const gchar *backend_name;
/* This applies to both the composer and signature editor. */
@@ -397,8 +398,8 @@ mail_shell_backend_constructed (GObject *object)
shell_backend);
g_signal_connect (
- shell, "window-created",
- G_CALLBACK (mail_shell_backend_window_created_cb),
+ shell, "window-added",
+ G_CALLBACK (mail_shell_backend_window_added_cb),
shell_backend);
e_mail_shell_settings_init (shell_backend);
diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c
index 30a6756ddf..50525c7c7f 100644
--- a/modules/mail/e-mail-shell-view-private.c
+++ b/modules/mail/e-mail-shell-view-private.c
@@ -983,11 +983,11 @@ e_mail_shell_view_update_sidebar (EMailShellView *mail_shell_view)
folder_name = camel_folder_get_display_name (folder);
parent_store = camel_folder_get_parent_store (folder);
- num_deleted = folder->summary->deleted_count;
- num_junked = folder->summary->junk_count;
- num_junked_not_deleted = folder->summary->junk_not_deleted_count;
- num_unread = folder->summary->unread_count;
- num_visible = folder->summary->visible_count;
+ num_deleted = camel_folder_summary_get_deleted_count (folder->summary);
+ num_junked = camel_folder_summary_get_junk_count (folder->summary);
+ num_junked_not_deleted = camel_folder_summary_get_junk_not_deleted_count (folder->summary);
+ num_unread = camel_folder_summary_get_unread_count (folder->summary);
+ num_visible = camel_folder_summary_get_visible_count (folder->summary);
buffer = g_string_sized_new (256);
uids = e_mail_reader_get_selected_uids (reader);
diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c
index 12a521b454..8453b88540 100644
--- a/modules/mail/em-composer-prefs.c
+++ b/modules/mail/em-composer-prefs.c
@@ -547,11 +547,11 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
gtk_container_add (GTK_CONTAINER (container), widget);
gtk_widget_show (widget);
- /* The mail shell backend responds to the "window-created" signal
+ /* The mail shell backend responds to the "window-added" signal
* that this triggers and configures it with composer preferences. */
g_signal_connect_swapped (
widget, "editor-created",
- G_CALLBACK (e_shell_watch_window), shell);
+ G_CALLBACK (gtk_application_add_window), shell);
/* Express mode does not honor this setting. */
if (!e_shell_get_express_mode (shell))
diff --git a/modules/offline-alert/evolution-offline-alert.c b/modules/offline-alert/evolution-offline-alert.c
index 9fb5d2a60c..c685815b17 100644
--- a/modules/offline-alert/evolution-offline-alert.c
+++ b/modules/offline-alert/evolution-offline-alert.c
@@ -97,10 +97,11 @@ offline_alert_network_available_cb (EShell *shell,
}
static void
-offline_alert_window_created_cb (EShell *shell,
- GtkWindow *window,
- EOfflineAlert *extension)
+offline_alert_window_added_cb (GtkApplication *application,
+ GtkWindow *window,
+ EOfflineAlert *extension)
{
+ EShell *shell = E_SHELL (application);
GtkAction *action;
if (!E_IS_SHELL_WINDOW (window))
@@ -118,7 +119,7 @@ offline_alert_window_created_cb (EShell *shell,
G_CALLBACK (offline_alert_network_available_cb), extension);
g_signal_handlers_disconnect_by_func (
- shell, offline_alert_window_created_cb, extension);
+ shell, offline_alert_window_added_cb, extension);
if (e_shell_get_online (shell))
return;
@@ -175,8 +176,8 @@ offline_alert_constructed (GObject *object)
/* Watch for the first EShellWindow. */
g_signal_connect (
- shell, "window-created",
- G_CALLBACK (offline_alert_window_created_cb), extension);
+ shell, "window-added",
+ G_CALLBACK (offline_alert_window_added_cb), extension);
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (e_offline_alert_parent_class)->constructed (object);