diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-03-04 22:12:42 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-03-04 22:21:38 +0800 |
commit | d5480344fca8619381697ceed646462c8ae1b44e (patch) | |
tree | 4104f8cbcbfcddb07b57e723c47d06f679fbee40 | |
parent | 3e7451169b7c643a03796cd87008cd1fd88edc1c (diff) | |
download | gsoc2013-evolution-d5480344fca8619381697ceed646462c8ae1b44e.tar gsoc2013-evolution-d5480344fca8619381697ceed646462c8ae1b44e.tar.gz gsoc2013-evolution-d5480344fca8619381697ceed646462c8ae1b44e.tar.bz2 gsoc2013-evolution-d5480344fca8619381697ceed646462c8ae1b44e.tar.lz gsoc2013-evolution-d5480344fca8619381697ceed646462c8ae1b44e.tar.xz gsoc2013-evolution-d5480344fca8619381697ceed646462c8ae1b44e.tar.zst gsoc2013-evolution-d5480344fca8619381697ceed646462c8ae1b44e.zip |
EMailTagEditor: Remove calendar configuration properties.
Remove EMailTagEditor's "use-24-hour-format" and "week-start-day"
properties, which were being used to manually configure its internal
EDateEdit instance. This is unnecessary since all EDateEdit instances
are automatically configured by the ESettingsDateEdit extension.
-rw-r--r-- | mail/e-mail-tag-editor.c | 109 | ||||
-rw-r--r-- | mail/e-mail-tag-editor.h | 10 | ||||
-rw-r--r-- | mail/em-utils.c | 19 |
3 files changed, 1 insertions, 137 deletions
diff --git a/mail/e-mail-tag-editor.c b/mail/e-mail-tag-editor.c index babc4d9c65..95b90f39b7 100644 --- a/mail/e-mail-tag-editor.c +++ b/mail/e-mail-tag-editor.c @@ -45,17 +45,11 @@ struct _EMailTagEditorPrivate { gboolean completed; time_t completed_date; - - /* EDateEdit settings */ - gint week_start_day; - gboolean use_24_hour_format; }; enum { PROP_0, - PROP_COMPLETED, - PROP_USE_24_HOUR_FORMAT, - PROP_WEEK_START_DAY + PROP_COMPLETED }; enum { @@ -85,18 +79,6 @@ mail_tag_editor_set_property (GObject *object, E_MAIL_TAG_EDITOR (object), g_value_get_boolean (value)); return; - - case PROP_USE_24_HOUR_FORMAT: - e_mail_tag_editor_set_use_24_hour_format ( - E_MAIL_TAG_EDITOR (object), - g_value_get_boolean (value)); - return; - - case PROP_WEEK_START_DAY: - e_mail_tag_editor_set_week_start_day ( - E_MAIL_TAG_EDITOR (object), - g_value_get_int (value)); - return; } G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); @@ -115,20 +97,6 @@ mail_tag_editor_get_property (GObject *object, e_mail_tag_editor_get_completed ( E_MAIL_TAG_EDITOR (object))); return; - - case PROP_USE_24_HOUR_FORMAT: - g_value_set_boolean ( - value, - e_mail_tag_editor_get_use_24_hour_format ( - E_MAIL_TAG_EDITOR (object))); - return; - - case PROP_WEEK_START_DAY: - g_value_set_int ( - value, - e_mail_tag_editor_get_week_start_day ( - E_MAIL_TAG_EDITOR (object))); - return; } G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); @@ -248,28 +216,6 @@ e_mail_tag_editor_class_init (EMailTagEditorClass *class) NULL, FALSE, G_PARAM_READWRITE)); - - g_object_class_install_property ( - object_class, - PROP_USE_24_HOUR_FORMAT, - g_param_spec_boolean ( - "use-24-hour-format", - "Use 24-Hour Format", - NULL, - TRUE, - G_PARAM_READWRITE)); - - g_object_class_install_property ( - object_class, - PROP_WEEK_START_DAY, - g_param_spec_int ( - "week-start-day", - "Week Start Day", - NULL, - 0, /* Monday */ - 6, /* Sunday */ - 0, - G_PARAM_READWRITE)); } static void @@ -337,14 +283,6 @@ e_mail_tag_editor_init (EMailTagEditor *editor) widget = e_builder_get_widget (builder, "target_date"); editor->priv->target_date = E_DATE_EDIT (widget); - g_object_bind_property ( - editor, "use-24-hour-format", - widget, "use-24-hour-format", - G_BINDING_SYNC_CREATE); - g_object_bind_property ( - editor, "week-start-day", - widget, "week-start-day", - G_BINDING_SYNC_CREATE); widget = e_builder_get_widget (builder, "completed"); g_object_bind_property ( @@ -390,51 +328,6 @@ e_mail_tag_editor_set_completed (EMailTagEditor *editor, g_object_notify (G_OBJECT (editor), "completed"); } -gint -e_mail_tag_editor_get_week_start_day (EMailTagEditor *editor) -{ - g_return_val_if_fail (E_IS_MAIL_TAG_EDITOR (editor), 1); - - return editor->priv->week_start_day; -} - -void -e_mail_tag_editor_set_week_start_day (EMailTagEditor *editor, - gint week_start_day) -{ - 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"); -} - -gboolean -e_mail_tag_editor_get_use_24_hour_format (EMailTagEditor *editor) -{ - g_return_val_if_fail (E_IS_MAIL_TAG_EDITOR (editor), TRUE); - - return editor->priv->use_24_hour_format; -} - -void -e_mail_tag_editor_set_use_24_hour_format (EMailTagEditor *editor, - gboolean use_24_hour_format) -{ - g_return_if_fail (E_IS_MAIL_TAG_EDITOR (editor)); - - if (editor->priv->use_24_hour_format == use_24_hour_format) - return; - - editor->priv->use_24_hour_format = use_24_hour_format; - - g_object_notify (G_OBJECT (editor), "use-24-hour-format"); -} - CamelTag * e_mail_tag_editor_get_tag_list (EMailTagEditor *editor) { diff --git a/mail/e-mail-tag-editor.h b/mail/e-mail-tag-editor.h index fe2365c903..5f4fa304c7 100644 --- a/mail/e-mail-tag-editor.h +++ b/mail/e-mail-tag-editor.h @@ -71,16 +71,6 @@ GtkWidget * e_mail_tag_editor_new (void); gboolean e_mail_tag_editor_get_completed (EMailTagEditor *editor); void e_mail_tag_editor_set_completed (EMailTagEditor *editor, gboolean completed); -gint e_mail_tag_editor_get_week_start_day - (EMailTagEditor *editor); -void e_mail_tag_editor_set_week_start_day - (EMailTagEditor *editor, - gint week_start_day); -gboolean e_mail_tag_editor_get_use_24_hour_format - (EMailTagEditor *editor); -void e_mail_tag_editor_set_use_24_hour_format - (EMailTagEditor *editor, - gboolean use_24_hour_format); CamelTag * e_mail_tag_editor_get_tag_list (EMailTagEditor *editor); void e_mail_tag_editor_set_tag_list (EMailTagEditor *editor, CamelTag *tag_list); diff --git a/mail/em-utils.c b/mail/em-utils.c index 3a4e2289ea..74a0eaca49 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -363,10 +363,6 @@ em_utils_flag_for_followup (EMailReader *reader, CamelFolder *folder, GPtrArray *uids) { - EShell *shell; - EMailBackend *backend; - EShellSettings *shell_settings; - EShellBackend *shell_backend; EMailDisplay *display; GtkWidget *editor; GtkWindow *window; @@ -378,25 +374,10 @@ em_utils_flag_for_followup (EMailReader *reader, g_return_if_fail (uids != NULL); window = e_mail_reader_get_window (reader); - backend = e_mail_reader_get_backend (reader); editor = e_mail_tag_editor_new (); gtk_window_set_transient_for (GTK_WINDOW (editor), window); - shell_backend = E_SHELL_BACKEND (backend); - shell = e_shell_backend_get_shell (shell_backend); - shell_settings = e_shell_get_shell_settings (shell); - - /* These settings come from the calendar module. */ - g_object_bind_property ( - shell_settings, "cal-use-24-hour-format", - editor, "use-24-hour-format", - G_BINDING_SYNC_CREATE); - g_object_bind_property ( - shell_settings, "cal-week-start-day", - editor, "week-start-day", - G_BINDING_SYNC_CREATE); - for (i = 0; i < uids->len; i++) { CamelMessageInfo *info; |