diff options
Diffstat (limited to 'modules')
46 files changed, 1530 insertions, 136 deletions
diff --git a/modules/Makefile.am b/modules/Makefile.am index 653d1b69c6..4c0c38dcbb 100644 --- a/modules/Makefile.am +++ b/modules/Makefile.am @@ -10,6 +10,10 @@ if ENABLE_NETWORK_MANAGER NETWORK_MANAGER_DIR = network-manager endif +if ENABLE_CONNMAN +CONNMAN_DIR = connman +endif + if ENABLE_WINDOWS_SENS WINDOWS_SENS_DIR = windows-sens endif @@ -22,6 +26,7 @@ SUBDIRS = \ $(MONO_DIR) \ $(PYTHON_DIR) \ $(NETWORK_MANAGER_DIR) \ - $(WINDOWS_SENS_DIR) + $(WINDOWS_SENS_DIR) \ + $(CONNMAN_DIR) -include $(top_srcdir)/git.mk diff --git a/modules/addressbook/e-book-shell-content.c b/modules/addressbook/e-book-shell-content.c index 55b833269e..9642627844 100644 --- a/modules/addressbook/e-book-shell-content.c +++ b/modules/addressbook/e-book-shell-content.c @@ -629,6 +629,7 @@ e_book_shell_content_set_preview_visible (EBookShellContent *book_shell_content, EShellSearchbar * e_book_shell_content_get_searchbar (EBookShellContent *book_shell_content) { + EShellView *shell_view; EShellContent *shell_content; GtkWidget *widget; @@ -636,7 +637,8 @@ e_book_shell_content_get_searchbar (EBookShellContent *book_shell_content) E_IS_BOOK_SHELL_CONTENT (book_shell_content), NULL); shell_content = E_SHELL_CONTENT (book_shell_content); - widget = e_shell_content_get_searchbar (shell_content); + shell_view = e_shell_content_get_shell_view (shell_content); + widget = e_shell_view_get_searchbar (shell_view); return E_SHELL_SEARCHBAR (widget); } diff --git a/modules/addressbook/e-book-shell-migrate.c b/modules/addressbook/e-book-shell-migrate.c index c237f40d94..55246ce047 100644 --- a/modules/addressbook/e-book-shell-migrate.c +++ b/modules/addressbook/e-book-shell-migrate.c @@ -370,7 +370,7 @@ migrate_contacts (MigrationContext *context, EBook *old_book, EBook *new_book) if (!e_book_add_contact (new_book, contact, &e)) - g_warning ("contact add failed: `%s'", e->message); + g_warning ("contact add failed: '%s'", e->message); num_added ++; @@ -400,14 +400,14 @@ migrate_contact_folder_to_source (MigrationContext *context, gchar *old_path, ES old_book = e_book_new (old_source, &e); if (!old_book || !e_book_open (old_book, TRUE, &e)) { - g_warning ("failed to load source book for migration: `%s'", e->message); + g_warning ("failed to load source book for migration: '%s'", e->message); goto finish; } new_book = e_book_new (new_source, &e); if (!new_book || !e_book_open (new_book, FALSE, &e)) { - g_warning ("failed to load destination book for migration: `%s'", e->message); + g_warning ("failed to load destination book for migration: '%s'", e->message); goto finish; } @@ -809,7 +809,7 @@ migrate_completion_folders (MigrationContext *context) e_source_set_property (source, "completion", "true"); } else { - g_warning ("found completion folder with uri `%s' that " + g_warning ("found completion folder with uri '%s' that " "doesn't correspond to anything we migrated.", physical_uri); } @@ -886,7 +886,7 @@ migrate_contact_lists_for_local_folders (MigrationContext *context, ESourceGroup if (!e_book_commit_contact (book, contact, &e)) - g_warning ("contact commit failed: `%s'", e->message); + g_warning ("contact commit failed: '%s'", e->message); } num_converted ++; @@ -989,7 +989,7 @@ migrate_company_phone_for_local_folders (MigrationContext *context, ESourceGroup if (!e_book_commit_contact (book, contact, &e)) - g_warning ("contact commit failed: `%s'", e->message); + g_warning ("contact commit failed: '%s'", e->message); } num_converted ++; diff --git a/modules/calendar/Makefile.am b/modules/calendar/Makefile.am index 0a22b2f568..bbabb6cfb2 100644 --- a/modules/calendar/Makefile.am +++ b/modules/calendar/Makefile.am @@ -14,8 +14,20 @@ libevolution_module_calendar_la_SOURCES = \ evolution-module-calendar.c \ e-cal-attachment-handler.c \ e-cal-attachment-handler.h \ + e-cal-config-calendar-item.c \ + e-cal-config-calendar-item.h \ + e-cal-config-date-edit.c \ + e-cal-config-date-edit.h \ e-cal-config-hook.c \ e-cal-config-hook.h \ + e-cal-config-meeting-store.c \ + e-cal-config-meeting-store.h \ + e-cal-config-meeting-time-selector.c \ + e-cal-config-meeting-time-selector.h \ + e-cal-config-model.c \ + e-cal-config-model.h \ + e-cal-config-view.c \ + e-cal-config-view.h \ e-cal-event-hook.c \ e-cal-event-hook.h \ e-cal-shell-backend.c \ diff --git a/modules/calendar/e-cal-config-calendar-item.c b/modules/calendar/e-cal-config-calendar-item.c new file mode 100644 index 0000000000..5c585f94ca --- /dev/null +++ b/modules/calendar/e-cal-config-calendar-item.c @@ -0,0 +1,79 @@ +/* + * e-cal-config-calendar-item.c + * + * 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/> + * + */ + +#include "e-cal-config-calendar-item.h" + +#include <shell/e-shell.h> +#include <e-util/e-binding.h> +#include <e-util/e-extension.h> +#include <misc/e-calendar-item.h> + +static void +cal_config_calendar_item_constructed (GObject *object) +{ + EExtension *extension; + EExtensible *extensible; + EShellSettings *shell_settings; + EShell *shell; + + extension = E_EXTENSION (object); + extensible = e_extension_get_extensible (extension); + + shell = e_shell_get_default (); + shell_settings = e_shell_get_shell_settings (shell); + + e_binding_new ( + shell_settings, "cal-show-week-numbers", + extensible, "show-week-numbers"); + + e_binding_new ( + shell_settings, "cal-week-start-day", + extensible, "week-start-day"); +} + +static void +cal_config_calendar_item_class_init (EExtensionClass *class) +{ + GObjectClass *object_class; + + object_class = G_OBJECT_CLASS (class); + object_class->constructed = cal_config_calendar_item_constructed; + + class->extensible_type = E_TYPE_CALENDAR_ITEM; +} + +void +e_cal_config_calendar_item_register_type (GTypeModule *type_module) +{ + static const GTypeInfo type_info = { + sizeof (EExtensionClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) cal_config_calendar_item_class_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (EExtension), + 0, /* n_preallocs */ + (GInstanceInitFunc) NULL, + NULL /* value_table */ + }; + + g_type_module_register_type ( + type_module, E_TYPE_EXTENSION, + "ECalConfigCalendarItem", &type_info, 0); +} diff --git a/modules/calendar/e-cal-config-calendar-item.h b/modules/calendar/e-cal-config-calendar-item.h new file mode 100644 index 0000000000..af12eb244a --- /dev/null +++ b/modules/calendar/e-cal-config-calendar-item.h @@ -0,0 +1,30 @@ +/* + * e-cal-config-calendar-item.h + * + * 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/> + * + */ + +#ifndef E_CAL_CONFIG_CALENDAR_ITEM_H +#define E_CAL_CONFIG_CALENDAR_ITEM_H + +#include <glib-object.h> + +G_BEGIN_DECLS + +void e_cal_config_calendar_item_register_type (GTypeModule *type_module); + +G_END_DECLS + +#endif /* E_CAL_CONFIG_CALENDAR_ITEM_H */ diff --git a/modules/calendar/e-cal-config-date-edit.c b/modules/calendar/e-cal-config-date-edit.c new file mode 100644 index 0000000000..667e749dff --- /dev/null +++ b/modules/calendar/e-cal-config-date-edit.c @@ -0,0 +1,79 @@ +/* + * e-cal-config-date-edit.c + * + * 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/> + * + */ + +#include "e-cal-config-date-edit.h" + +#include <shell/e-shell.h> +#include <e-util/e-binding.h> +#include <e-util/e-extension.h> +#include <misc/e-dateedit.h> + +static void +cal_config_date_edit_constructed (GObject *object) +{ + EExtension *extension; + EExtensible *extensible; + EShellSettings *shell_settings; + EShell *shell; + + extension = E_EXTENSION (object); + extensible = e_extension_get_extensible (extension); + + shell = e_shell_get_default (); + shell_settings = e_shell_get_shell_settings (shell); + + e_binding_new ( + shell_settings, "cal-show-week-numbers", + extensible, "show-week-numbers"); + + e_binding_new ( + shell_settings, "cal-week-start-day", + extensible, "week-start-day"); +} + +static void +cal_config_date_edit_class_init (EExtensionClass *class) +{ + GObjectClass *object_class; + + object_class = G_OBJECT_CLASS (class); + object_class->constructed = cal_config_date_edit_constructed; + + class->extensible_type = E_TYPE_DATE_EDIT; +} + +void +e_cal_config_date_edit_register_type (GTypeModule *type_module) +{ + static const GTypeInfo type_info = { + sizeof (EExtensionClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) cal_config_date_edit_class_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (EExtension), + 0, /* n_preallocs */ + (GInstanceInitFunc) NULL, + NULL /* value_table */ + }; + + g_type_module_register_type ( + type_module, E_TYPE_EXTENSION, + "ECalConfigDateEdit", &type_info, 0); +} diff --git a/modules/calendar/e-cal-config-date-edit.h b/modules/calendar/e-cal-config-date-edit.h new file mode 100644 index 0000000000..33291201dc --- /dev/null +++ b/modules/calendar/e-cal-config-date-edit.h @@ -0,0 +1,30 @@ +/* + * e-cal-config-date-edit.h + * + * 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/> + * + */ + +#ifndef E_CAL_CONFIG_DATE_EDIT_H +#define E_CAL_CONFIG_DATE_EDIT_H + +#include <glib-object.h> + +G_BEGIN_DECLS + +void e_cal_config_date_edit_register_type (GTypeModule *type_module); + +G_END_DECLS + +#endif /* E_CAL_CONFIG_DATE_EDIT_H */ diff --git a/modules/calendar/e-cal-config-meeting-store.c b/modules/calendar/e-cal-config-meeting-store.c new file mode 100644 index 0000000000..7169ac4029 --- /dev/null +++ b/modules/calendar/e-cal-config-meeting-store.c @@ -0,0 +1,79 @@ +/* + * e-cal-config-meeting-store.c + * + * 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/> + * + */ + +#include "e-cal-config-meeting-store.h" + +#include <shell/e-shell.h> +#include <e-util/e-binding.h> +#include <e-util/e-extension.h> +#include <calendar/gui/e-meeting-store.h> + +static void +cal_config_meeting_store_constructed (GObject *object) +{ + EExtension *extension; + EExtensible *extensible; + EShellSettings *shell_settings; + EShell *shell; + + extension = E_EXTENSION (object); + extensible = e_extension_get_extensible (extension); + + shell = e_shell_get_default (); + shell_settings = e_shell_get_shell_settings (shell); + + e_binding_new ( + shell_settings, "cal-free-busy-template", + extensible, "free-busy-template"); + + e_binding_new ( + shell_settings, "cal-timezone", + extensible, "timezone"); +} + +static void +cal_config_meeting_store_class_init (EExtensionClass *class) +{ + GObjectClass *object_class; + + object_class = G_OBJECT_CLASS (class); + object_class->constructed = cal_config_meeting_store_constructed; + + class->extensible_type = E_TYPE_MEETING_STORE; +} + +void +e_cal_config_meeting_store_register_type (GTypeModule *type_module) +{ + static const GTypeInfo type_info = { + sizeof (EExtensionClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) cal_config_meeting_store_class_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (EExtension), + 0, /* n_preallocs */ + (GInstanceInitFunc) NULL, + NULL /* value_table */ + }; + + g_type_module_register_type ( + type_module, E_TYPE_EXTENSION, + "ECalConfigMeetingStore", &type_info, 0); +} diff --git a/modules/calendar/e-cal-config-meeting-store.h b/modules/calendar/e-cal-config-meeting-store.h new file mode 100644 index 0000000000..9ad2835da8 --- /dev/null +++ b/modules/calendar/e-cal-config-meeting-store.h @@ -0,0 +1,30 @@ +/* + * e-cal-config-meeting-store.h + * + * 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/> + * + */ + +#ifndef E_CAL_CONFIG_MEETING_STORE_H +#define E_CAL_CONFIG_MEETING_STORE_H + +#include <glib-object.h> + +G_BEGIN_DECLS + +void e_cal_config_meeting_store_register_type (GTypeModule *type_module); + +G_END_DECLS + +#endif /* E_CAL_CONFIG_MEETING_STORE_H */ diff --git a/modules/calendar/e-cal-config-meeting-time-selector.c b/modules/calendar/e-cal-config-meeting-time-selector.c new file mode 100644 index 0000000000..1c45d3b9ef --- /dev/null +++ b/modules/calendar/e-cal-config-meeting-time-selector.c @@ -0,0 +1,83 @@ +/* + * e-cal-config-meeting-time-selector.c + * + * 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/> + * + */ + +#include "e-cal-config-meeting-time-selector.h" + +#include <shell/e-shell.h> +#include <e-util/e-binding.h> +#include <e-util/e-extension.h> +#include <calendar/gui/e-meeting-time-sel.h> + +static void +cal_config_meeting_time_selector_constructed (GObject *object) +{ + EExtension *extension; + EExtensible *extensible; + EShellSettings *shell_settings; + EShell *shell; + + extension = E_EXTENSION (object); + extensible = e_extension_get_extensible (extension); + + shell = e_shell_get_default (); + shell_settings = e_shell_get_shell_settings (shell); + + e_binding_new ( + shell_settings, "cal-show-week-numbers", + extensible, "show-week-numbers"); + + e_binding_new ( + shell_settings, "cal-use-24-hour-format", + extensible, "use-24-hour-format"); + + e_binding_new ( + shell_settings, "cal-week-start-day", + extensible, "week-start-day"); +} + +static void +cal_config_meeting_time_selector_class_init (EExtensionClass *class) +{ + GObjectClass *object_class; + + object_class = G_OBJECT_CLASS (class); + object_class->constructed = cal_config_meeting_time_selector_constructed; + + class->extensible_type = E_TYPE_MEETING_TIME_SELECTOR; +} + +void +e_cal_config_meeting_time_selector_register_type (GTypeModule *type_module) +{ + static const GTypeInfo type_info = { + sizeof (EExtensionClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) cal_config_meeting_time_selector_class_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (EExtension), + 0, /* n_preallocs */ + (GInstanceInitFunc) NULL, + NULL /* value_table */ + }; + + g_type_module_register_type ( + type_module, E_TYPE_EXTENSION, + "ECalConfigMeetingTimeSelector", &type_info, 0); +} diff --git a/modules/calendar/e-cal-config-meeting-time-selector.h b/modules/calendar/e-cal-config-meeting-time-selector.h new file mode 100644 index 0000000000..b244263605 --- /dev/null +++ b/modules/calendar/e-cal-config-meeting-time-selector.h @@ -0,0 +1,30 @@ +/* + * e-cal-config-meeting-time-selector.h + * + * 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/> + * + */ + +#ifndef E_CAL_CONFIG_MEETING_TIME_SELECTOR_H +#define E_CAL_CONFIG_MEETING_TIME_SELECTOR_H + +#include <glib-object.h> + +G_BEGIN_DECLS + +void e_cal_config_meeting_time_selector_register_type (GTypeModule *type_module); + +G_END_DECLS + +#endif /* E_CAL_CONFIG_MEETING_TIME_SELECTOR_H */ diff --git a/modules/calendar/e-cal-config-model.c b/modules/calendar/e-cal-config-model.c new file mode 100644 index 0000000000..d176d509e9 --- /dev/null +++ b/modules/calendar/e-cal-config-model.c @@ -0,0 +1,99 @@ +/* + * e-cal-config-model.c + * + * 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/> + * + */ + +#include "e-cal-config-model.h" + +#include <shell/e-shell.h> +#include <e-util/e-binding.h> +#include <e-util/e-extension.h> +#include <calendar/gui/e-cal-model.h> +#include <calendar/gui/e-cal-model-tasks.h> + +static void +cal_config_model_constructed (GObject *object) +{ + EExtension *extension; + EExtensible *extensible; + EShellSettings *shell_settings; + EShell *shell; + + extension = E_EXTENSION (object); + extensible = e_extension_get_extensible (extension); + + shell = e_shell_get_default (); + shell_settings = e_shell_get_shell_settings (shell); + + /*** ECalModel ***/ + + e_binding_new ( + shell_settings, "cal-timezone", + extensible, "timezone"); + + e_binding_new ( + shell_settings, "cal-use-24-hour-format", + extensible, "use-24-hour-format"); + + e_binding_new ( + shell_settings, "cal-week-start-day", + extensible, "week-start-day"); + + /*** ECalModelTasks ***/ + + if (E_IS_CAL_MODEL_TASKS (extensible)) { + + e_binding_new ( + shell_settings, "cal-tasks-color-due-today", + extensible, "color-due-today"); + + e_binding_new ( + shell_settings, "cal-tasks-color-overdue", + extensible, "color-overdue"); + } +} + +static void +cal_config_model_class_init (EExtensionClass *class) +{ + GObjectClass *object_class; + + object_class = G_OBJECT_CLASS (class); + object_class->constructed = cal_config_model_constructed; + + class->extensible_type = E_TYPE_CAL_MODEL; +} + +void +e_cal_config_model_register_type (GTypeModule *type_module) +{ + static const GTypeInfo type_info = { + sizeof (EExtensionClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) cal_config_model_class_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (EExtension), + 0, /* n_preallocs */ + (GInstanceInitFunc) NULL, + NULL /* value_table */ + }; + + g_type_module_register_type ( + type_module, E_TYPE_EXTENSION, + "ECalConfigModel", &type_info, 0); +} diff --git a/modules/calendar/e-cal-config-model.h b/modules/calendar/e-cal-config-model.h new file mode 100644 index 0000000000..1c1045a906 --- /dev/null +++ b/modules/calendar/e-cal-config-model.h @@ -0,0 +1,30 @@ +/* + * e-cal-config-model.h + * + * 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/> + * + */ + +#ifndef E_CAL_CONFIG_MODEL_H +#define E_CAL_CONFIG_MODEL_H + +#include <glib-object.h> + +G_BEGIN_DECLS + +void e_cal_config_model_register_type (GTypeModule *type_module); + +G_END_DECLS + +#endif /* E_CAL_CONFIG_MODEL_H */ diff --git a/modules/calendar/e-cal-config-view.c b/modules/calendar/e-cal-config-view.c new file mode 100644 index 0000000000..e543bf6c56 --- /dev/null +++ b/modules/calendar/e-cal-config-view.c @@ -0,0 +1,130 @@ +/* + * e-cal-config-view.c + * + * 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/> + * + */ + +#include "e-cal-config-view.h" + +#include <shell/e-shell.h> +#include <e-util/e-binding.h> +#include <e-util/e-extension.h> +#include <calendar/gui/e-day-view.h> +#include <calendar/gui/e-week-view.h> + +static void +cal_config_view_constructed (GObject *object) +{ + EExtension *extension; + EExtensible *extensible; + EShellSettings *shell_settings; + EShell *shell; + + extension = E_EXTENSION (object); + extensible = e_extension_get_extensible (extension); + + shell = e_shell_get_default (); + shell_settings = e_shell_get_shell_settings (shell); + + /*** EDayView ***/ + + if (E_IS_DAY_VIEW (extensible)) { + + e_binding_new ( + shell_settings, "cal-show-week-numbers", + E_DAY_VIEW (extensible)->week_number_label, "visible"); + + e_binding_new ( + shell_settings, "cal-marcus-bains-show-line", + extensible, "marcus-bains-show-line"); + + e_binding_new ( + shell_settings, "cal-marcus-bains-day-view-color", + extensible, "marcus-bains-day-view-color"); + + e_binding_new ( + shell_settings, "cal-marcus-bains-time-bar-color", + extensible, "marcus-bains-time-bar-color"); + + e_binding_new ( + shell_settings, "cal-time-divisions", + extensible, "mins-per-row"); + + e_binding_new ( + shell_settings, "cal-work-day-end-hour", + extensible, "work-day-end-hour"); + + e_binding_new ( + shell_settings, "cal-work-day-end-minute", + extensible, "work-day-end-minute"); + + e_binding_new ( + shell_settings, "cal-work-day-start-hour", + extensible, "work-day-start-hour"); + + e_binding_new ( + shell_settings, "cal-work-day-start-minute", + extensible, "work-day-start-minute"); + + e_binding_new ( + shell_settings, "cal-working-days-bitset", + extensible, "working-days"); + } + + /*** EWeekView ***/ + + if (E_IS_WEEK_VIEW (extensible)) { + + e_binding_new ( + shell_settings, "cal-compress-weekend", + extensible, "compress-weekend"); + + e_binding_new ( + shell_settings, "cal-show-event-end-times", + extensible, "show-event-end-times"); + } +} + +static void +cal_config_view_class_init (EExtensionClass *class) +{ + GObjectClass *object_class; + + object_class = G_OBJECT_CLASS (class); + object_class->constructed = cal_config_view_constructed; + + class->extensible_type = E_TYPE_CALENDAR_VIEW; +} + +void +e_cal_config_view_register_type (GTypeModule *type_module) +{ + static const GTypeInfo type_info = { + sizeof (EExtensionClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) cal_config_view_class_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (EExtension), + 0, /* n_preallocs */ + (GInstanceInitFunc) NULL, + NULL /* value_table */ + }; + + g_type_module_register_type ( + type_module, E_TYPE_EXTENSION, + "ECalConfigView", &type_info, 0); +} diff --git a/modules/calendar/e-cal-config-view.h b/modules/calendar/e-cal-config-view.h new file mode 100644 index 0000000000..e36acddf0c --- /dev/null +++ b/modules/calendar/e-cal-config-view.h @@ -0,0 +1,31 @@ +/* + * e-cal-config-view.h + * + * 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/> + * + */ + +#ifndef E_CAL_CONFIG_VIEW_H +#define E_CAL_CONFIG_VIEW_H + +#include <glib-object.h> + +G_BEGIN_DECLS + +void e_cal_config_view_register_type (GTypeModule *type_module); + +G_END_DECLS + +#endif /* E_CAL_CONFIG_VIEW_H */ + diff --git a/modules/calendar/e-cal-shell-backend.c b/modules/calendar/e-cal-shell-backend.c index 5e6f390189..86750f0a32 100644 --- a/modules/calendar/e-cal-shell-backend.c +++ b/modules/calendar/e-cal-shell-backend.c @@ -600,7 +600,7 @@ cal_shell_backend_handle_uri_cb (EShellBackend *shell_backend, source = e_source_list_peek_source_by_uid (source_list, source_uid); if (source == NULL) { - g_printerr ("No source for UID `%s'\n", source_uid); + g_printerr ("No source for UID '%s'\n", source_uid); g_object_unref (source_list); goto exit; } diff --git a/modules/calendar/e-cal-shell-content.c b/modules/calendar/e-cal-shell-content.c index f5cc0162c0..e35b935f05 100644 --- a/modules/calendar/e-cal-shell-content.c +++ b/modules/calendar/e-cal-shell-content.c @@ -314,11 +314,11 @@ cal_shell_content_constructed (GObject *object) { ECalShellContentPrivate *priv; ECalendarView *calendar_view; - ECalModel *memo_model; - ECalModel *task_model; + ECalModel *memo_model=NULL; + ECalModel *task_model=NULL; EShell *shell; EShellContent *shell_content; - EShellSettings *shell_settings; + EShellBackend *shell_backend; EShellView *shell_view; EShellWindow *shell_window; EShellContent *foreign_content; @@ -342,51 +342,57 @@ cal_shell_content_constructed (GObject *object) shell_window = e_shell_view_get_shell_window (shell_view); shell = e_shell_window_get_shell (shell_window); - shell_settings = e_shell_get_shell_settings (shell); /* We borrow the memopad and taskpad models from the memo * and task views, loading the views if necessary. */ - - foreign_view = e_shell_window_get_shell_view (shell_window, "memos"); - foreign_content = e_shell_view_get_shell_content (foreign_view); - g_object_get (foreign_content, "model", &memo_model, NULL); - - foreign_view = e_shell_window_get_shell_view (shell_window, "tasks"); - foreign_content = e_shell_view_get_shell_content (foreign_view); - g_object_get (foreign_content, "model", &task_model, NULL); - + if(!e_shell_get_express_mode(e_shell_get_default())) { + foreign_view = e_shell_window_get_shell_view (shell_window, "memos"); + foreign_content = e_shell_view_get_shell_content (foreign_view); + g_object_get (foreign_content, "model", &memo_model, NULL); + + foreign_view = e_shell_window_get_shell_view (shell_window, "tasks"); + foreign_content = e_shell_view_get_shell_content (foreign_view); + g_object_get (foreign_content, "model", &task_model, NULL); + } /* Build content widgets. */ container = GTK_WIDGET (object); + + if (!e_shell_get_express_mode(e_shell_get_default())) { + widget = e_paned_new (GTK_ORIENTATION_HORIZONTAL); + gtk_container_add (GTK_CONTAINER (container), widget); + priv->hpaned = g_object_ref (widget); + gtk_widget_show (widget); - widget = e_paned_new (GTK_ORIENTATION_HORIZONTAL); - gtk_container_add (GTK_CONTAINER (container), widget); - priv->hpaned = g_object_ref (widget); - gtk_widget_show (widget); - - container = priv->hpaned; + container = priv->hpaned; + } widget = gtk_notebook_new (); gtk_notebook_set_show_tabs (GTK_NOTEBOOK (widget), FALSE); gtk_notebook_set_show_border (GTK_NOTEBOOK (widget), FALSE); - gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, FALSE); + if (!e_shell_get_express_mode(e_shell_get_default())) + gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, FALSE); + else + gtk_container_add (GTK_CONTAINER (container), widget); priv->notebook = g_object_ref (widget); gtk_widget_show (widget); - /* FIXME Need to deal with saving and restoring the position. - * Month view has its own position. */ - widget = e_paned_new (GTK_ORIENTATION_VERTICAL); - e_paned_set_fixed_resize (E_PANED (widget), FALSE); - gtk_paned_pack2 (GTK_PANED (container), widget, FALSE, TRUE); - priv->vpaned = g_object_ref (widget); - gtk_widget_show (widget); + if (!e_shell_get_express_mode(e_shell_get_default())) { + /* FIXME Need to deal with saving and restoring the position. + * Month view has its own position. */ + widget = e_paned_new (GTK_ORIENTATION_VERTICAL); + e_paned_set_fixed_resize (E_PANED (widget), FALSE); + gtk_paned_pack2 (GTK_PANED (container), widget, FALSE, TRUE); + priv->vpaned = g_object_ref (widget); + gtk_widget_show (widget); + } container = priv->notebook; /* Add views in the order defined by GnomeCalendarViewType, such * that the notebook page number corresponds to the view type. */ - priv->calendar = gnome_calendar_new (shell_settings); + priv->calendar = gnome_calendar_new (); calendar = GNOME_CALENDAR (priv->calendar); for (ii = 0; ii < GNOME_CAL_LAST_VIEW; ii++) { @@ -403,7 +409,7 @@ cal_shell_content_constructed (GObject *object) priv->notebook, "page"); container = priv->vpaned; - +if(!e_shell_get_express_mode(e_shell_get_default())) { widget = gtk_vbox_new (FALSE, 0); gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, TRUE); gtk_widget_show (widget); @@ -484,7 +490,7 @@ cal_shell_content_constructed (GObject *object) widget, "open-component", G_CALLBACK (e_cal_shell_view_memopad_open_memo), shell_view); - +} /* Load the view instance. */ view_instance = e_shell_view_new_view_instance (shell_view, NULL); @@ -496,21 +502,23 @@ cal_shell_content_constructed (GObject *object) * The GtkWidget::map() callback below explains why. */ priv->view_instance = view_instance; - g_signal_connect_swapped ( - shell_view, "notify::view-id", - G_CALLBACK (cal_shell_content_notify_view_id_cb), - object); + if (!e_shell_get_express_mode(e_shell_get_default())) { + g_signal_connect_swapped ( + shell_view, "notify::view-id", + G_CALLBACK (cal_shell_content_notify_view_id_cb), + object); - /* Bind GObject properties to GConf keys. */ + bridge = gconf_bridge_get (); - bridge = gconf_bridge_get (); - - object = G_OBJECT (priv->vpaned); - key = "/apps/evolution/calendar/display/tag_vpane_position"; - gconf_bridge_bind_property_delayed (bridge, key, object, "proportion"); + object = G_OBJECT (priv->vpaned); + key = "/apps/evolution/calendar/display/tag_vpane_position"; + gconf_bridge_bind_property_delayed (bridge, key, object, "proportion"); + } - g_object_unref (memo_model); - g_object_unref (task_model); + if (memo_model) + g_object_unref (memo_model); + if (task_model) + g_object_unref (task_model); } static void @@ -545,7 +553,7 @@ cal_shell_content_class_init (ECalShellContentClass *class) object_class->get_property = cal_shell_content_get_property; object_class->dispose = cal_shell_content_dispose; object_class->constructed = cal_shell_content_constructed; - + widget_class = GTK_WIDGET_CLASS (class); widget_class->map = cal_shell_content_map; @@ -669,6 +677,7 @@ e_cal_shell_content_get_task_table (ECalShellContent *cal_shell_content) EShellSearchbar * e_cal_shell_content_get_searchbar (ECalShellContent *cal_shell_content) { + EShellView *shell_view; EShellContent *shell_content; GtkWidget *widget; @@ -676,7 +685,8 @@ e_cal_shell_content_get_searchbar (ECalShellContent *cal_shell_content) E_IS_CAL_SHELL_CONTENT (cal_shell_content), NULL); shell_content = E_SHELL_CONTENT (cal_shell_content); - widget = e_shell_content_get_searchbar (shell_content); + shell_view = e_shell_content_get_shell_view (shell_content); + widget = e_shell_view_get_searchbar (shell_view); return E_SHELL_SEARCHBAR (widget); } diff --git a/modules/calendar/e-cal-shell-migrate.c b/modules/calendar/e-cal-shell-migrate.c index ea0e6aa751..f307522a9b 100644 --- a/modules/calendar/e-cal-shell-migrate.c +++ b/modules/calendar/e-cal-shell-migrate.c @@ -82,7 +82,7 @@ static e_gconf_map_t calendar_other_map[] = { static e_gconf_map_t calendar_datenavigator_map[] = { /* /Calendar/DateNavigator */ - { "ShowWeekNumbers", "calendar/date_navigator/show_week_numbers", E_GCONF_MAP_BOOL }, + { "ShowWeekNumbers", "calendar/display/show_week_numbers", E_GCONF_MAP_BOOL }, { NULL }, }; @@ -690,7 +690,7 @@ e_cal_shell_backend_migrate (EShellBackend *shell_backend, if (!migrate_ical_folder (l->data, on_this_computer, source_name, E_CAL_SOURCE_TYPE_EVENT)) { /* FIXME: domain/code */ - g_set_error(error, 0, 0, _("Unable to migrate calendar `%s'"), source_name); + g_set_error(error, 0, 0, _("Unable to migrate calendar '%s'"), source_name); g_free(source_name); goto fail; } diff --git a/modules/calendar/e-cal-shell-settings.c b/modules/calendar/e-cal-shell-settings.c index 3852de0a52..4613f280bb 100644 --- a/modules/calendar/e-cal-shell-settings.c +++ b/modules/calendar/e-cal-shell-settings.c @@ -491,8 +491,8 @@ e_cal_shell_backend_init_settings (EShell *shell) "/apps/evolution/calendar/prompts/confirm_purge"); e_shell_settings_install_property_for_key ( - "cal-day-view-show-week-numbers", - "/apps/evolution/calendar/display/day_view_show_week_number"); + "cal-show-week-numbers", + "/apps/evolution/calendar/display/show_week_numbers"); e_shell_settings_install_property_for_key ( "cal-free-busy-template", @@ -539,10 +539,6 @@ e_cal_shell_backend_init_settings (EShell *shell) "/apps/evolution/calendar/display/show_event_end"); e_shell_settings_install_property_for_key ( - "cal-show-week-numbers", - "/apps/evolution/calendar/date_navigator/show_week_numbers"); - - e_shell_settings_install_property_for_key ( "cal-tasks-color-due-today", "/apps/evolution/calendar/tasks/colors/due_today"); diff --git a/modules/calendar/e-cal-shell-sidebar.c b/modules/calendar/e-cal-shell-sidebar.c index eb28868ce6..546d21b3c3 100644 --- a/modules/calendar/e-cal-shell-sidebar.c +++ b/modules/calendar/e-cal-shell-sidebar.c @@ -33,6 +33,7 @@ #include "calendar/gui/calendar-config.h" #include "calendar/gui/e-calendar-selector.h" #include "calendar/gui/misc.h" +#include "calendar/gui/dialogs/calendar-setup.h" #include "e-cal-shell-view.h" #include "e-cal-shell-backend.h" @@ -476,7 +477,7 @@ cal_shell_sidebar_restore_state_cb (EShellWindow *shell_window, bridge = gconf_bridge_get (); object = G_OBJECT (priv->paned); - key = "/apps/evolution/calendar/display/date_navigator_vpane_position"; + key = "/apps/evolution/calendar/display/date_navigator_pane_position"; gconf_bridge_bind_property_delayed (bridge, key, object, "vposition"); } @@ -559,6 +560,21 @@ cal_shell_sidebar_finalize (GObject *object) } static void +new_calendar_clicked (GtkButton *button, + EShellSidebar *shell_sidebar) +{ + EShellView *shell_view; + EShellWindow *shell_window; + EShellBackend *shell_backend; + + shell_view = e_shell_sidebar_get_shell_view (shell_sidebar); + shell_backend = e_shell_view_get_shell_backend (shell_view); + shell_window = e_shell_view_get_shell_window (shell_view); + + calendar_setup_new_calendar (GTK_WINDOW (shell_window)); +} + +static void cal_shell_sidebar_constructed (GObject *object) { ECalShellSidebarPrivate *priv; @@ -605,7 +621,21 @@ cal_shell_sidebar_constructed (GObject *object) GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type ( GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN); - gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, TRUE); + if(!e_shell_get_express_mode(e_shell_get_default())) { + gtk_paned_pack1 (GTK_PANED (container), widget, TRUE, TRUE); + } else { + GtkWidget *button; + + container = gtk_vbox_new (FALSE, 6); + gtk_box_pack_start (GTK_BOX(container), widget, TRUE, TRUE, 0); + + button = gtk_button_new_with_label (_("New Calendar...")); + gtk_box_pack_start (GTK_BOX(container), button, FALSE, FALSE, 0); + g_signal_connect (button, "clicked", G_CALLBACK(new_calendar_clicked), shell_sidebar); + + gtk_paned_pack1 (GTK_PANED (priv->paned), container, TRUE, TRUE); + gtk_widget_show_all (container); + } gtk_widget_show (widget); container = widget; @@ -624,7 +654,8 @@ cal_shell_sidebar_constructed (GObject *object) calitem = E_CALENDAR (widget)->calitem; e_calendar_item_set_days_start_week_sel (calitem, 9); e_calendar_item_set_max_days_sel (calitem, 42); - gtk_paned_pack2 (GTK_PANED (container), widget, FALSE, TRUE); + gtk_paned_pack2 (GTK_PANED (container), widget, FALSE, FALSE); + gtk_widget_set_size_request (widget, -1, 200); priv->date_navigator = g_object_ref (widget); gtk_widget_show (widget); diff --git a/modules/calendar/e-cal-shell-view-actions.c b/modules/calendar/e-cal-shell-view-actions.c index 5eaa9a4eb0..83f6101d0a 100644 --- a/modules/calendar/e-cal-shell-view-actions.c +++ b/modules/calendar/e-cal-shell-view-actions.c @@ -1196,6 +1196,25 @@ action_event_schedule_cb (GtkAction *action, edit_event_as (cal_shell_view, TRUE); } + static void +quit_calendar_cb (GtkAction *action, + ECalShellView *cal_shell_view) +{ + EShellView *shell_view; + EShellWindow *shell_window; + GdkEvent *event; + + shell_view = E_SHELL_VIEW (cal_shell_view); + shell_window = e_shell_view_get_shell_window (shell_view); + + /* Synthesize a delete_event on this window. */ + event = gdk_event_new (GDK_DELETE); + event->any.window = g_object_ref (((GtkWidget *) shell_window)->window); + event->any.send_event = TRUE; + gtk_main_do_event (event); + gdk_event_free (event); +} + static void action_event_schedule_appointment_cb (GtkAction *action, ECalShellView *cal_shell_view) @@ -1428,6 +1447,13 @@ static GtkActionEntry calendar_entries[] = { N_("Converts a meeting to an appointment"), G_CALLBACK (action_event_schedule_appointment_cb) }, + { "quit-calendar", + GTK_STOCK_CLOSE, + N_("Quit"), + NULL, + NULL, /* XXX Add a tooltip! */ + G_CALLBACK (quit_calendar_cb) }, + /*** Menus ***/ { "calendar-actions-menu", @@ -1689,7 +1715,7 @@ e_cal_shell_view_actions_init (ECalShellView *cal_shell_view) cal_shell_content = cal_shell_view->priv->cal_shell_content; searchbar = e_cal_shell_content_get_searchbar (cal_shell_content); - + /* Calendar Actions */ action_group = ACTION_GROUP (CALENDAR); gtk_action_group_add_actions ( @@ -1710,8 +1736,9 @@ e_cal_shell_view_actions_init (ECalShellView *cal_shell_view) /* Advanced Search Action */ action = ACTION (CALENDAR_SEARCH_ADVANCED_HIDDEN); gtk_action_set_visible (action, FALSE); - e_shell_searchbar_set_search_option ( - searchbar, GTK_RADIO_ACTION (action)); + if (searchbar) + e_shell_searchbar_set_search_option ( + searchbar, GTK_RADIO_ACTION (action)); /* Lockdown Printing Actions */ action_group = ACTION_GROUP (LOCKDOWN_PRINTING); @@ -1833,18 +1860,20 @@ e_cal_shell_view_update_search_filter (ECalShellView *cal_shell_view) cal_shell_content = cal_shell_view->priv->cal_shell_content; searchbar = e_cal_shell_content_get_searchbar (cal_shell_content); - combo_box = e_shell_searchbar_get_filter_combo_box (searchbar); + if (searchbar) { + combo_box = e_shell_searchbar_get_filter_combo_box (searchbar); - e_shell_view_block_execute_search (shell_view); + e_shell_view_block_execute_search (shell_view); - /* Use any action in the group; doesn't matter which. */ - e_action_combo_box_set_action (combo_box, radio_action); + /* Use any action in the group; doesn't matter which. */ + e_action_combo_box_set_action (combo_box, radio_action); - ii = CALENDAR_FILTER_UNMATCHED; - e_action_combo_box_add_separator_after (combo_box, ii); + ii = CALENDAR_FILTER_UNMATCHED; + e_action_combo_box_add_separator_after (combo_box, ii); - ii = CALENDAR_FILTER_NEXT_7_DAYS_APPOINTMENTS; - e_action_combo_box_add_separator_after (combo_box, ii); + ii = CALENDAR_FILTER_NEXT_7_DAYS_APPOINTMENTS; + e_action_combo_box_add_separator_after (combo_box, ii); - e_shell_view_unblock_execute_search (shell_view); + e_shell_view_unblock_execute_search (shell_view); + } } diff --git a/modules/calendar/e-cal-shell-view-actions.h b/modules/calendar/e-cal-shell-view-actions.h index a69b82f645..b79bc6baaf 100644 --- a/modules/calendar/e-cal-shell-view-actions.h +++ b/modules/calendar/e-cal-shell-view-actions.h @@ -89,6 +89,8 @@ E_SHELL_WINDOW_ACTION ((window), "event-reply-all") #define E_SHELL_WINDOW_ACTION_EVENT_OCCURRENCE_MOVABLE(window) \ E_SHELL_WINDOW_ACTION ((window), "event-occurrence-movable") +#define E_SHELL_WINDOW_ACTION_EVENT_MEETING_NEW(window) \ + E_SHELL_WINDOW_ACTION ((window), "event-meeting-new") /* Memo Pad Actions */ #define E_SHELL_WINDOW_ACTION_CALENDAR_MEMOPAD_FORWARD(window) \ diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c index c669c29b33..a958a9f05e 100644 --- a/modules/calendar/e-cal-shell-view-private.c +++ b/modules/calendar/e-cal-shell-view-private.c @@ -28,6 +28,16 @@ #define CHECK_NB 5 +/* be compatible with older e-d-s for MeeGo */ +#ifndef ETC_TIMEZONE +# define ETC_TIMEZONE "/etc/timezone" +# define ETC_TIMEZONE_MAJ "/etc/TIMEZONE" +# define ETC_RC_CONF "/etc/rc.conf" +# define ETC_SYSCONFIG_CLOCK "/etc/sysconfig/clock" +# define ETC_CONF_D_CLOCK "/etc/conf.d/clock" +# define ETC_LOCALTIME "/etc/localtime" +#endif + static const gchar * files_to_check [CHECK_NB] = { ETC_TIMEZONE, ETC_TIMEZONE_MAJ, @@ -611,35 +621,41 @@ e_cal_shell_view_private_constructed (ECalShellView *cal_shell_view) G_CALLBACK (cal_shell_view_selector_client_removed_cb), cal_shell_view); - g_signal_connect_swapped ( - memo_table, "popup-event", - G_CALLBACK (cal_shell_view_memopad_popup_event_cb), - cal_shell_view); - - g_signal_connect_swapped ( - memo_table, "selection-change", - G_CALLBACK (e_cal_shell_view_memopad_actions_update), - cal_shell_view); + if (memo_table) + g_signal_connect_swapped ( + memo_table, "popup-event", + G_CALLBACK (cal_shell_view_memopad_popup_event_cb), + cal_shell_view); - g_signal_connect_swapped ( - memo_table, "status-message", - G_CALLBACK (e_cal_shell_view_memopad_set_status_message), - cal_shell_view); + if (memo_table) + g_signal_connect_swapped ( + memo_table, "selection-change", + G_CALLBACK (e_cal_shell_view_memopad_actions_update), + cal_shell_view); - g_signal_connect_swapped ( - task_table, "popup-event", - G_CALLBACK (cal_shell_view_taskpad_popup_event_cb), - cal_shell_view); + if (memo_table) + g_signal_connect_swapped ( + memo_table, "status-message", + G_CALLBACK (e_cal_shell_view_memopad_set_status_message), + cal_shell_view); - g_signal_connect_swapped ( - task_table, "status-message", - G_CALLBACK (e_cal_shell_view_taskpad_set_status_message), - cal_shell_view); + if (task_table) + g_signal_connect_swapped ( + task_table, "popup-event", + G_CALLBACK (cal_shell_view_taskpad_popup_event_cb), + cal_shell_view); - g_signal_connect_swapped ( - task_table, "selection-change", - G_CALLBACK (e_cal_shell_view_taskpad_actions_update), - cal_shell_view); + if (task_table) + g_signal_connect_swapped ( + task_table, "status-message", + G_CALLBACK (e_cal_shell_view_taskpad_set_status_message), + cal_shell_view); + + if (task_table) + g_signal_connect_swapped ( + task_table, "selection-change", + G_CALLBACK (e_cal_shell_view_taskpad_actions_update), + cal_shell_view); e_categories_add_change_hook ( (GHookFunc) e_cal_shell_view_update_search_filter, diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c index cd44f37c56..1f719e82c5 100644 --- a/modules/calendar/e-cal-shell-view.c +++ b/modules/calendar/e-cal-shell-view.c @@ -283,6 +283,7 @@ cal_shell_view_update_actions (EShellView *shell_view) GtkAction *action; GList *list, *iter; gboolean sensitive; + gboolean visible; guint32 state; gint n_selected; @@ -303,6 +304,26 @@ cal_shell_view_update_actions (EShellView *shell_view) shell_window = e_shell_view_get_shell_window (shell_view); + if(e_shell_get_express_mode(e_shell_get_default())) { + GtkWidget *widget, *item; + + /* Hack: Get rid of New and Send/Receive in toolbar + * while in express mode */ + widget = e_shell_window_get_managed_widget ( + shell_window, "/main-toolbar"); + + item = (GtkWidget *)gtk_toolbar_get_nth_item ((GtkToolbar *)widget, 0); + gtk_widget_hide(item); + + widget = e_shell_window_get_managed_widget ( + shell_window, "/main-menu"); + gtk_widget_hide(widget); + + item = e_shell_window_get_managed_widget ( + shell_window, "/main-toolbar/send-receive"); + if (item) + gtk_widget_hide(item); + } cal_shell_content = priv->cal_shell_content; calendar = e_cal_shell_content_get_calendar (cal_shell_content); view_type = gnome_calendar_get_view (calendar); @@ -444,6 +465,10 @@ cal_shell_view_update_actions (EShellView *shell_view) action = ACTION (EVENT_REPLY_ALL); sensitive = (n_selected == 1) && is_meeting; gtk_action_set_sensitive (action, sensitive); + + action = ACTION (EVENT_MEETING_NEW); + visible = itip_addresses_get_default() != NULL; + gtk_action_set_visible (action, visible); } static void @@ -472,7 +497,7 @@ cal_shell_view_class_init (ECalShellViewClass *class, shell_view_class->new_shell_sidebar = e_cal_shell_sidebar_new; shell_view_class->execute_search = cal_shell_view_execute_search; shell_view_class->update_actions = cal_shell_view_update_actions; -} +} static void cal_shell_view_init (ECalShellView *cal_shell_view, diff --git a/modules/calendar/e-memo-shell-backend.c b/modules/calendar/e-memo-shell-backend.c index 979b525304..b0635b6e38 100644 --- a/modules/calendar/e-memo-shell-backend.c +++ b/modules/calendar/e-memo-shell-backend.c @@ -419,7 +419,7 @@ memo_shell_backend_handle_uri_cb (EShellBackend *shell_backend, source = e_source_list_peek_source_by_uid (source_list, source_uid); if (source == NULL) { - g_printerr ("No source for UID `%s'\n", source_uid); + g_printerr ("No source for UID '%s'\n", source_uid); g_object_unref (source_list); goto exit; } diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c index 34946b7bdd..d56a6105d1 100644 --- a/modules/calendar/e-memo-shell-content.c +++ b/modules/calendar/e-memo-shell-content.c @@ -418,7 +418,7 @@ memo_shell_content_constructed (GObject *object) shell = e_shell_backend_get_shell (shell_backend); shell_settings = e_shell_get_shell_settings (shell); - priv->memo_model = e_cal_model_memos_new (shell_settings); + priv->memo_model = e_cal_model_memos_new (); timezone = e_shell_settings_get_pointer ( shell_settings, "cal-timezone"); @@ -730,6 +730,7 @@ e_memo_shell_content_set_preview_visible (EMemoShellContent *memo_shell_content, EShellSearchbar * e_memo_shell_content_get_searchbar (EMemoShellContent *memo_shell_content) { + EShellView *shell_view; EShellContent *shell_content; GtkWidget *widget; @@ -737,7 +738,8 @@ e_memo_shell_content_get_searchbar (EMemoShellContent *memo_shell_content) E_IS_MEMO_SHELL_CONTENT (memo_shell_content), NULL); shell_content = E_SHELL_CONTENT (memo_shell_content); - widget = e_shell_content_get_searchbar (shell_content); + shell_view = e_shell_content_get_shell_view (shell_content); + widget = e_shell_view_get_searchbar (shell_view); return E_SHELL_SEARCHBAR (widget); } diff --git a/modules/calendar/e-task-shell-backend.c b/modules/calendar/e-task-shell-backend.c index 7926555ec6..e428c9413e 100644 --- a/modules/calendar/e-task-shell-backend.c +++ b/modules/calendar/e-task-shell-backend.c @@ -424,7 +424,7 @@ task_shell_backend_handle_uri_cb (EShellBackend *shell_backend, source = e_source_list_peek_source_by_uid (source_list, source_uid); if (source == NULL) { - g_printerr ("No source for UID `%s'\n", source_uid); + g_printerr ("No source for UID '%s'\n", source_uid); g_object_unref (source_list); goto exit; } diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c index 5fb39a9738..910b4da48e 100644 --- a/modules/calendar/e-task-shell-content.c +++ b/modules/calendar/e-task-shell-content.c @@ -415,7 +415,7 @@ task_shell_content_constructed (GObject *object) shell = e_shell_window_get_shell (shell_window); shell_settings = e_shell_get_shell_settings (shell); - priv->task_model = e_cal_model_tasks_new (shell_settings); + priv->task_model = e_cal_model_tasks_new (); timezone = e_shell_settings_get_pointer ( shell_settings, "cal-timezone"); @@ -752,6 +752,7 @@ e_task_shell_content_set_preview_visible (ETaskShellContent *task_shell_content, EShellSearchbar * e_task_shell_content_get_searchbar (ETaskShellContent *task_shell_content) { + EShellView *shell_view; EShellContent *shell_content; GtkWidget *widget; @@ -759,7 +760,8 @@ e_task_shell_content_get_searchbar (ETaskShellContent *task_shell_content) E_IS_TASK_SHELL_CONTENT (task_shell_content), NULL); shell_content = E_SHELL_CONTENT (task_shell_content); - widget = e_shell_content_get_searchbar (shell_content); + shell_view = e_shell_content_get_shell_view (shell_content); + widget = e_shell_view_get_searchbar (shell_view); return E_SHELL_SEARCHBAR (widget); } diff --git a/modules/calendar/e-task-shell-migrate.c b/modules/calendar/e-task-shell-migrate.c index 3ba36ce9b1..3c3210b472 100644 --- a/modules/calendar/e-task-shell-migrate.c +++ b/modules/calendar/e-task-shell-migrate.c @@ -617,7 +617,7 @@ e_task_shell_backend_migrate (EShellBackend *shell_backend, if (!migrate_ical_folder (l->data, on_this_computer, source_name, E_CAL_SOURCE_TYPE_TODO)) { /* FIXME: domain/code */ - g_set_error(error, 0, 0, _("Unable to migrate tasks `%s'"), source_name); + g_set_error(error, 0, 0, _("Unable to migrate tasks '%s'"), source_name); g_free(source_name); goto fail; } diff --git a/modules/calendar/evolution-module-calendar.c b/modules/calendar/evolution-module-calendar.c index f72e8a97e4..b54f6439a3 100644 --- a/modules/calendar/evolution-module-calendar.c +++ b/modules/calendar/evolution-module-calendar.c @@ -39,6 +39,13 @@ #include "e-task-shell-sidebar.h" #include "e-task-shell-view.h" +#include "e-cal-config-calendar-item.h" +#include "e-cal-config-date-edit.h" +#include "e-cal-config-meeting-store.h" +#include "e-cal-config-meeting-time-selector.h" +#include "e-cal-config-model.h" +#include "e-cal-config-view.h" + /* Module Entry Points */ void e_module_load (GTypeModule *type_module); void e_module_unload (GTypeModule *type_module); @@ -67,6 +74,13 @@ e_module_load (GTypeModule *type_module) e_task_shell_content_register_type (type_module); e_task_shell_sidebar_register_type (type_module); e_task_shell_view_register_type (type_module); + + e_cal_config_calendar_item_register_type (type_module); + e_cal_config_date_edit_register_type (type_module); + e_cal_config_meeting_store_register_type (type_module); + e_cal_config_meeting_time_selector_register_type (type_module); + e_cal_config_model_register_type (type_module); + e_cal_config_view_register_type (type_module); } G_MODULE_EXPORT void diff --git a/modules/connman/Makefile.am b/modules/connman/Makefile.am new file mode 100644 index 0000000000..63822262c4 --- /dev/null +++ b/modules/connman/Makefile.am @@ -0,0 +1,22 @@ +module_LTLIBRARIES = libevolution-module-connman.la + +libevolution_module_connman_la_CPPFLAGS = \ + $(AM_CPPFLAGS) \ + -I$(top_srcdir) \ + -DG_LOG_DOMAIN=\"evolution-connman\" \ + $(GNOME_PLATFORM_CFLAGS) \ + $(DBUS_GLIB_CFLAGS) + +libevolution_module_connman_la_SOURCES = \ + evolution-connman.c + +libevolution_module_connman_la_LIBADD = \ + $(top_builddir)/e-util/libeutil.la \ + $(top_builddir)/shell/libeshell.la \ + $(GNOME_PLATFORM_LIBS) \ + $(DBUS_GLIB_LIBS) + +libevolution_module_connman_la_LDFLAGS = \ + -module -avoid-version $(NO_UNDEFINED) + +-include $(top_srcdir)/git.mk diff --git a/modules/connman/evolution-connman.c b/modules/connman/evolution-connman.c new file mode 100644 index 0000000000..abf532f295 --- /dev/null +++ b/modules/connman/evolution-connman.c @@ -0,0 +1,209 @@ +/* + * evolution-connman.c + * + * 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/> + * + */ + +#include <dbus/dbus.h> +#include <dbus/dbus-glib.h> +#include <dbus/dbus-glib-lowlevel.h> + +#include <shell/e-shell.h> +#include <e-util/e-extension.h> + +#define CM_DBUS_SERVICE "org.moblin.connman" +#define CM_DBUS_INTERFACE "org.moblin.connman.Manager" +#define CM_DBUS_PATH "/" + +/* Standard GObject macros */ +#define E_TYPE_CONNMAN \ + (e_connman_get_type ()) +#define E_CONNMAN(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST \ + ((obj), E_TYPE_CONNMAN, EConnMan)) + +typedef struct { + EExtension parent; + DBusConnection *connection; +} EConnMan; +typedef EExtensionClass EConnManClass; + +/* Module Entry Points */ +void e_module_load (GTypeModule *type_module); +void e_module_unload (GTypeModule *type_module); + +/* Forward Declarations */ +GType e_connman_get_type (void); +static gboolean network_manager_connect (EConnMan *extension); + +G_DEFINE_DYNAMIC_TYPE (EConnMan, e_connman, E_TYPE_EXTENSION) + +static void +extension_set_state (EConnMan *extension, const char *state) +{ + EExtensible *extensible; + + extensible = e_extension_get_extensible (E_EXTENSION (extension)); + g_return_if_fail (E_IS_SHELL (extensible)); + + e_shell_set_network_available (E_SHELL (extensible), !g_strcmp0 (state, "online")); +} + +static DBusHandlerResult +connman_monitor (DBusConnection *connection G_GNUC_UNUSED, + DBusMessage *message, + gpointer user_data) +{ + char *value; + EConnMan *extension = user_data; + DBusError error = DBUS_ERROR_INIT; + DBusHandlerResult ret = DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + + if (!dbus_message_has_path (message, CM_DBUS_PATH) || + !dbus_message_has_interface (message, CM_DBUS_INTERFACE) || + !dbus_message_has_member (message, "StateChanged")) + goto err_exit; + + if (!dbus_message_get_args (message, &error, + DBUS_TYPE_STRING, &value, + DBUS_TYPE_INVALID)) + goto err_exit; + + extension_set_state (extension, value); + ret = DBUS_HANDLER_RESULT_HANDLED; + + err_exit: + return ret; +} + +static void +connman_check_initial_state (EConnMan *extension) +{ + DBusMessage *message = NULL; + DBusMessage *response = NULL; + DBusError error = DBUS_ERROR_INIT; + + message = dbus_message_new_method_call ( + CM_DBUS_SERVICE, CM_DBUS_PATH, CM_DBUS_INTERFACE, "GetState"); + + /* XXX Assuming this should be safe to call synchronously. */ + response = dbus_connection_send_with_reply_and_block ( + extension->connection, message, 100, &error); + + if (response != NULL) { + const char *value; + if (dbus_message_get_args (message, &error, + DBUS_TYPE_STRING, &value, + DBUS_TYPE_INVALID)) + extension_set_state (extension, value); + } else { + g_warning ("%s", error.message); + dbus_error_free (&error); + return; + } + + dbus_message_unref (message); + dbus_message_unref (response); +} + +static gboolean +network_manager_connect (EConnMan *extension) +{ + DBusError error = DBUS_ERROR_INIT; + + /* This is a timeout callback, so the return value denotes + * whether to reschedule, not whether we're successful. */ + + if (extension->connection != NULL) + return FALSE; + + extension->connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error); + if (extension->connection == NULL) { + g_warning ("%s", error.message); + dbus_error_free (&error); + return TRUE; + } + + dbus_connection_setup_with_g_main (extension->connection, NULL); + dbus_connection_set_exit_on_disconnect (extension->connection, FALSE); + + if (!dbus_connection_add_filter ( + extension->connection, connman_monitor, extension, NULL)) + goto fail; + + dbus_bus_add_match ( + extension->connection, + "type='signal'," + "interface='" CM_DBUS_INTERFACE "'," + "sender='" CM_DBUS_SERVICE "'," + "member='StateChanged'," + "path='" CM_DBUS_PATH "'", + &error); + if (dbus_error_is_set (&error)) { + g_warning ("%s", error.message); + dbus_error_free (&error); + goto fail; + } + + connman_check_initial_state (extension); + + return FALSE; + +fail: + dbus_connection_unref (extension->connection); + extension->connection = NULL; + + return TRUE; +} + +static void +network_manager_constructed (GObject *object) +{ + network_manager_connect (E_CONNMAN (object)); +} + +static void +e_connman_class_init (EConnManClass *class) +{ + GObjectClass *object_class; + EExtensionClass *extension_class; + + object_class = G_OBJECT_CLASS (class); + object_class->constructed = network_manager_constructed; + + extension_class = E_EXTENSION_CLASS (class); + extension_class->extensible_type = E_TYPE_SHELL; +} + +static void +e_connman_class_finalize (EConnManClass *class) +{ +} + +static void +e_connman_init (EConnMan *extension) +{ +} + +G_MODULE_EXPORT void +e_module_load (GTypeModule *type_module) +{ + e_connman_register_type (type_module); +} + +G_MODULE_EXPORT void +e_module_unload (GTypeModule *type_module) +{ +} diff --git a/modules/mail/Makefile.am b/modules/mail/Makefile.am index 65a5c30d1f..323820217b 100644 --- a/modules/mail/Makefile.am +++ b/modules/mail/Makefile.am @@ -17,8 +17,12 @@ libevolution_module_mail_la_SOURCES = \ evolution-module-mail.c \ e-mail-attachment-handler.c \ e-mail-attachment-handler.h \ + e-mail-config-format-html.c \ + e-mail-config-format-html.h \ e-mail-config-hook.c \ e-mail-config-hook.h \ + e-mail-config-web-view.c \ + e-mail-config-web-view.h \ e-mail-event-hook.c \ e-mail-event-hook.h \ e-mail-junk-hook.c \ diff --git a/modules/mail/e-mail-config-format-html.c b/modules/mail/e-mail-config-format-html.c new file mode 100644 index 0000000000..a92a943976 --- /dev/null +++ b/modules/mail/e-mail-config-format-html.c @@ -0,0 +1,93 @@ +/* + * e-mail-config-format-html.c + * + * 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/> + * + */ + +#include "e-mail-config-format-html.h" + +#include <shell/e-shell.h> +#include <e-util/e-binding.h> +#include <e-util/e-extension.h> +#include <mail/em-format-html.h> + +static void +mail_config_format_html_constructed (GObject *object) +{ + EExtension *extension; + EExtensible *extensible; + EShellSettings *shell_settings; + EShell *shell; + + extension = E_EXTENSION (object); + extensible = e_extension_get_extensible (extension); + + shell = e_shell_get_default (); + shell_settings = e_shell_get_shell_settings (shell); + + e_binding_new_full ( + shell_settings, "mail-citation-color", + extensible, "citation-color", + e_binding_transform_string_to_color, + NULL, NULL); + + e_binding_new ( + shell_settings, "mail-image-loading-policy", + extensible, "image-loading-policy"); + + e_binding_new ( + shell_settings, "mail-only-local-photos", + extensible, "only-local-photos"); + + e_binding_new ( + shell_settings, "mail-show-sender-photo", + extensible, "show-sender-photo"); + + e_binding_new ( + shell_settings, "mail-show-real-date", + extensible, "show-real-date"); +} + +static void +mail_config_format_html_class_init (EExtensionClass *class) +{ + GObjectClass *object_class; + + object_class = G_OBJECT_CLASS (class); + object_class->constructed = mail_config_format_html_constructed; + + class->extensible_type = EM_TYPE_FORMAT_HTML; +} + +void +e_mail_config_format_html_register_type (GTypeModule *type_module) +{ + static const GTypeInfo type_info = { + sizeof (EExtensionClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) mail_config_format_html_class_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (EExtension), + 0, /* n_preallocs */ + (GInstanceInitFunc) NULL, + NULL /* value_table */ + }; + + g_type_module_register_type ( + type_module, E_TYPE_EXTENSION, + "EMailConfigFormatHTML", &type_info, 0); +} diff --git a/modules/mail/e-mail-config-format-html.h b/modules/mail/e-mail-config-format-html.h new file mode 100644 index 0000000000..bed76d88b7 --- /dev/null +++ b/modules/mail/e-mail-config-format-html.h @@ -0,0 +1,30 @@ +/* + * e-mail-config-format-html.h + * + * 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/> + * + */ + +#ifndef E_MAIL_CONFIG_FORMAT_HTML_H +#define E_MAIL_CONFIG_FORMAT_HTML_H + +#include <glib-object.h> + +G_BEGIN_DECLS + +void e_mail_config_format_html_register_type (GTypeModule *type_module); + +G_END_DECLS + +#endif /* E_MAIL_CONFIG_FORMAT_HTML_H */ diff --git a/modules/mail/e-mail-config-web-view.c b/modules/mail/e-mail-config-web-view.c new file mode 100644 index 0000000000..5cfb648154 --- /dev/null +++ b/modules/mail/e-mail-config-web-view.c @@ -0,0 +1,100 @@ +/* + * e-mail-config-web-view.c + * + * 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/> + * + */ + +#include "e-mail-config-web-view.h" + +#include <shell/e-shell.h> +#include <e-util/e-binding.h> +#include <e-util/e-extension.h> +#include <misc/e-web-view.h> + +static void +mail_config_web_view_realize (GtkWidget *widget) +{ + EShell *shell; + EShellSettings *shell_settings; + + shell = e_shell_get_default (); + shell_settings = e_shell_get_shell_settings (shell); + + e_binding_new ( + shell_settings, "mail-show-animated-images", + widget, "animate"); + + e_binding_new ( + shell_settings, "composer-inline-spelling", + widget, "inline-spelling"); + + e_binding_new ( + shell_settings, "composer-magic-links", + widget, "magic-links"); + + e_binding_new ( + shell_settings, "composer-magic-smileys", + widget, "magic-smileys"); +} + +static void +mail_config_web_view_constructed (GObject *object) +{ + EExtension *extension; + EExtensible *extensible; + + extension = E_EXTENSION (object); + extensible = e_extension_get_extensible (extension); + + /* Wait to bind shell settings until the EWebView is realized + * so GtkhtmlEditor has a chance to install a GtkHTMLEditorAPI. + * Otherwise our settings will have no effect. */ + + g_signal_connect ( + extensible, "realize", + G_CALLBACK (mail_config_web_view_realize), NULL); +} + +static void +mail_config_web_view_class_init (EExtensionClass *class) +{ + GObjectClass *object_class; + + object_class = G_OBJECT_CLASS (class); + object_class->constructed = mail_config_web_view_constructed; + + class->extensible_type = E_TYPE_WEB_VIEW; +} + +void +e_mail_config_web_view_register_type (GTypeModule *type_module) +{ + static const GTypeInfo type_info = { + sizeof (EExtensionClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) mail_config_web_view_class_init, + (GClassFinalizeFunc) NULL, + NULL, /* class_data */ + sizeof (EExtension), + 0, /* n_preallocs */ + (GInstanceInitFunc) NULL, + NULL /* value_table */ + }; + + g_type_module_register_type ( + type_module, E_TYPE_EXTENSION, + "EMailConfigWebView", &type_info, 0); +} diff --git a/modules/mail/e-mail-config-web-view.h b/modules/mail/e-mail-config-web-view.h new file mode 100644 index 0000000000..c2a8758709 --- /dev/null +++ b/modules/mail/e-mail-config-web-view.h @@ -0,0 +1,30 @@ +/* + * e-mail-config-web-view.h + * + * 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/> + * + */ + +#ifndef E_MAIL_CONFIG_WEB_VIEW_H +#define E_MAIL_CONFIG_WEB_VIEW_H + +#include <glib-object.h> + +G_BEGIN_DECLS + +void e_mail_config_web_view_register_type (GTypeModule *type_module); + +G_END_DECLS + +#endif /* E_MAIL_CONFIG_WEB_VIEW_H */ diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c index de8d4f42d9..b3eb0a97c1 100644 --- a/modules/mail/e-mail-shell-backend.c +++ b/modules/mail/e-mail-shell-backend.c @@ -408,32 +408,28 @@ mail_shell_backend_window_created_cb (EShell *shell, GtkWindow *window, EShellBackend *shell_backend) { - EShellSettings *shell_settings; static gboolean first_time = TRUE; const gchar *backend_name; - shell_settings = e_shell_get_shell_settings (shell); - /* This applies to both the composer and signature editor. */ if (GTKHTML_IS_EDITOR (window)) { + EShellSettings *shell_settings; GList *spell_languages; - - e_binding_new ( - shell_settings, "composer-inline-spelling", - window, "inline-spelling"); - - e_binding_new ( - shell_settings, "composer-magic-links", - window, "magic-links"); - - e_binding_new ( - shell_settings, "composer-magic-smileys", - window, "magic-smileys"); + gboolean active = TRUE; spell_languages = e_load_spell_languages (); gtkhtml_editor_set_spell_languages ( GTKHTML_EDITOR (window), spell_languages); g_list_free (spell_languages); + + shell_settings = e_shell_get_shell_settings (shell); + + /* Express mode does not honor this setting. */ + if (!e_shell_get_express_mode (shell)) + active = e_shell_settings_get_boolean ( + shell_settings, "composer-format-html"); + + gtkhtml_editor_set_html_mode (GTKHTML_EDITOR (window), active); } if (E_IS_MSG_COMPOSER (window)) { diff --git a/modules/mail/e-mail-shell-content.c b/modules/mail/e-mail-shell-content.c index 846c1ee854..aa2718dcec 100644 --- a/modules/mail/e-mail-shell-content.c +++ b/modules/mail/e-mail-shell-content.c @@ -621,7 +621,7 @@ mail_shell_content_set_folder (EMailReader *reader, key = STATE_KEY_GROUP_BY_THREADS; value = g_key_file_get_boolean (key_file, group_name, key, &error); if (error != NULL) { - value = FALSE; + value = TRUE; g_clear_error (&error); } @@ -881,6 +881,7 @@ e_mail_shell_content_set_preview_visible (EMailShellContent *mail_shell_content, EShellSearchbar * e_mail_shell_content_get_searchbar (EMailShellContent *mail_shell_content) { + EShellView *shell_view; EShellContent *shell_content; GtkWidget *widget; @@ -888,7 +889,8 @@ e_mail_shell_content_get_searchbar (EMailShellContent *mail_shell_content) E_IS_MAIL_SHELL_CONTENT (mail_shell_content), NULL); shell_content = E_SHELL_CONTENT (mail_shell_content); - widget = e_shell_content_get_searchbar (shell_content); + shell_view = e_shell_content_get_shell_view (shell_content); + widget = e_shell_view_get_searchbar (shell_view); return E_SHELL_SEARCHBAR (widget); } diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c index e92800c660..f534c2a276 100644 --- a/modules/mail/e-mail-shell-view-actions.c +++ b/modules/mail/e-mail-shell-view-actions.c @@ -1223,7 +1223,7 @@ static GtkRadioActionEntry mail_filter_entries[] = { MAIL_FILTER_LAST_5_DAYS_MESSAGES }, { "mail-filter-messages-not-junk", - "mail-mark-notjunk", + "mail-mark-not-junk", N_("Messages Not Junk"), NULL, NULL, /* XXX Add a tooltip! */ diff --git a/modules/mail/e-mail-shell-view-actions.h b/modules/mail/e-mail-shell-view-actions.h index eb11f46013..addd67452b 100644 --- a/modules/mail/e-mail-shell-view-actions.h +++ b/modules/mail/e-mail-shell-view-actions.h @@ -115,8 +115,8 @@ E_SHELL_WINDOW_ACTION ((window), "mail-mark-important") #define E_SHELL_WINDOW_ACTION_MAIL_MARK_JUNK(window) \ E_SHELL_WINDOW_ACTION ((window), "mail-mark-junk") -#define E_SHELL_WINDOW_ACTION_MAIL_MARK_NOTJUNK(window) \ - E_SHELL_WINDOW_ACTION ((window), "mail-mark-notjunk") +#define E_SHELL_WINDOW_ACTION_MAIL_MARK_NOT_JUNK(window) \ + E_SHELL_WINDOW_ACTION ((window), "mail-mark-not-junk") #define E_SHELL_WINDOW_ACTION_MAIL_MARK_READ(window) \ E_SHELL_WINDOW_ACTION ((window), "mail-mark-read") #define E_SHELL_WINDOW_ACTION_MAIL_MARK_UNIMPORTANT(window) \ diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c index 574657806e..49f2fda5b6 100644 --- a/modules/mail/em-composer-prefs.c +++ b/modules/mail/em-composer-prefs.c @@ -36,6 +36,7 @@ #include "em-composer-prefs.h" #include "composer/e-msg-composer.h" +#include "shell/e-shell-utils.h" #include <camel/camel-iconv.h> @@ -398,10 +399,15 @@ em_composer_prefs_construct (EMComposerPrefs *prefs, /* General tab */ /* Default Behavior */ + + /* Express mode does not honor this setting. */ widget = e_builder_get_widget (prefs->builder, "chkSendHTML"); - e_mutual_binding_new ( - shell_settings, "composer-format-html", - widget, "active"); + if (e_shell_get_express_mode (shell)) + gtk_widget_hide (widget); + else + e_mutual_binding_new ( + shell_settings, "composer-format-html", + widget, "active"); widget = e_builder_get_widget (prefs->builder, "chkPromptEmptySubject"); e_mutual_binding_new ( @@ -517,9 +523,11 @@ em_composer_prefs_construct (EMComposerPrefs *prefs, widget, "editor-created", G_CALLBACK (e_shell_watch_window), shell); - e_binding_new ( - shell_settings, "composer-format-html", - widget, "prefer-html"); + /* Express mode does not honor this setting. */ + if (!e_shell_get_express_mode (shell)) + e_binding_new ( + shell_settings, "composer-format-html", + widget, "prefer-html"); #ifndef G_OS_WIN32 e_binding_new_with_negation ( @@ -545,6 +553,14 @@ em_composer_prefs_construct (EMComposerPrefs *prefs, signature_tree_view, "selected", widget, "signature"); + /* Sanitize the dialog for Express mode */ + e_shell_hide_widgets_for_express_mode (shell, prefs->builder, + "chkOutlookFilenames", + "vboxTopPosting", + "labelAlerts", + "chkPromptEmptySubject", + NULL); + /* get our toplevel widget */ target = em_config_target_new_prefs (ec, client); e_config_set_target ((EConfig *)ec, (EConfigTarget *)target); diff --git a/modules/mail/em-mailer-prefs.c b/modules/mail/em-mailer-prefs.c index 89a7f0acc9..a885c72744 100644 --- a/modules/mail/em-mailer-prefs.c +++ b/modules/mail/em-mailer-prefs.c @@ -43,6 +43,7 @@ #include "e-util/e-datetime-format.h" #include "e-util/e-util-private.h" #include "widgets/misc/e-charset-combo-box.h" +#include "shell/e-shell-utils.h" #include "e-mail-label-manager.h" #include "e-mail-reader-utils.h" @@ -1207,6 +1208,15 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs, g_signal_connect (G_OBJECT (prefs->junk_header_add), "clicked", G_CALLBACK (jh_add_cb), prefs); g_signal_connect (G_OBJECT (prefs->junk_header_remove), "clicked", G_CALLBACK (jh_remove_cb), prefs); + /* Sanitize the dialog for Express mode */ + e_shell_hide_widgets_for_express_mode (shell, prefs->builder, + "hboxReadTimeout", + "hboxMailSizeLimit", + "hboxShrinkAddresses", + "magic_spacebar_checkbox", + "hboxEnableSearchFolders", + NULL); + /* get our toplevel widget */ target = em_config_target_new_prefs(ec, prefs->gconf); e_config_set_target((EConfig *)ec, (EConfigTarget *)target); diff --git a/modules/mail/evolution-module-mail.c b/modules/mail/evolution-module-mail.c index 1bb58c7742..9e9744569b 100644 --- a/modules/mail/evolution-module-mail.c +++ b/modules/mail/evolution-module-mail.c @@ -30,6 +30,9 @@ #include "e-mail-shell-sidebar.h" #include "e-mail-shell-view.h" +#include "e-mail-config-format-html.h" +#include "e-mail-config-web-view.h" + /* Module Entry Points */ void e_module_load (GTypeModule *type_module); void e_module_unload (GTypeModule *type_module); @@ -50,6 +53,9 @@ e_module_load (GTypeModule *type_module) e_mail_shell_content_register_type (type_module); e_mail_shell_sidebar_register_type (type_module); e_mail_shell_view_register_type (type_module); + + e_mail_config_format_html_register_type (type_module); + e_mail_config_web_view_register_type (type_module); } G_MODULE_EXPORT void diff --git a/modules/network-manager/Makefile.am b/modules/network-manager/Makefile.am index f7a01a6c31..90579dae38 100644 --- a/modules/network-manager/Makefile.am +++ b/modules/network-manager/Makefile.am @@ -12,8 +12,8 @@ libevolution_module_network_manager_la_SOURCES = \ evolution-network-manager.c libevolution_module_network_manager_la_LIBADD = \ - $(top_builddir)/shell/libeshell.la \ $(top_builddir)/e-util/libeutil.la \ + $(top_builddir)/shell/libeshell.la \ $(GNOME_PLATFORM_LIBS) \ $(DBUS_GLIB_LIBS) |