diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-09-07 07:23:57 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-09-09 02:53:45 +0800 |
commit | fa9051e04051156a9e11e2af72a0d7342f4ea2e4 (patch) | |
tree | 0d064bddb366257c660722359dc33f5ef3c610c7 /modules | |
parent | c9e7aa7aee6b407659843131cc8becdafa71992a (diff) | |
download | gsoc2013-evolution-fa9051e04051156a9e11e2af72a0d7342f4ea2e4.tar.gz gsoc2013-evolution-fa9051e04051156a9e11e2af72a0d7342f4ea2e4.tar.zst gsoc2013-evolution-fa9051e04051156a9e11e2af72a0d7342f4ea2e4.zip |
Finish killing Bonobo.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/addressbook/e-book-shell-backend.c | 29 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-content.c | 11 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-view-actions.c | 2 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-view-private.c | 25 | ||||
-rw-r--r-- | modules/calendar/e-memo-shell-view.c | 2 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-content.c | 11 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-view-actions.c | 2 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-view-private.c | 29 | ||||
-rw-r--r-- | modules/calendar/e-task-shell-view.c | 2 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-content.c | 10 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-view-actions.c | 4 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-view-private.h | 1 |
12 files changed, 62 insertions, 66 deletions
diff --git a/modules/addressbook/e-book-shell-backend.c b/modules/addressbook/e-book-shell-backend.c index 243ce3a848..a14b3bad16 100644 --- a/modules/addressbook/e-book-shell-backend.c +++ b/modules/addressbook/e-book-shell-backend.c @@ -37,6 +37,7 @@ #include "addressbook/gui/widgets/eab-gui-util.h" #include "addressbook/gui/contact-editor/e-contact-editor.h" +#include "addressbook/gui/contact-editor/e-contact-quick-add.h" #include "addressbook/gui/contact-list-editor/e-contact-list-editor.h" #include "addressbook/importers/evolution-addressbook-importers.h" @@ -379,6 +380,26 @@ book_shell_backend_init_preferences (EShell *shell) return FALSE; } +static void +book_shell_backend_quick_add_email_cb (EShell *shell, + const gchar *email) +{ + /* XXX This is an ugly hack but it's the only way I could think + * of to integrate this feature with other shell modules. */ + + e_contact_quick_add_free_form (email, NULL, NULL); +} + +static void +book_shell_backend_quick_add_vcard_cb (EShell *shell, + const gchar *vcard) +{ + /* XXX This is an ugly hack but it's the only way I could think + * of to integrate this feature with other shell modules. */ + + e_contact_quick_add_vcard (vcard, NULL, NULL); +} + static gboolean book_shell_backend_handle_uri_cb (EShellBackend *shell_backend, const gchar *uri) @@ -518,6 +539,14 @@ book_shell_backend_constructed (GObject *object) book_shell_backend_init_importers (); book_shell_backend_ensure_sources (shell_backend); + g_signal_connect ( + shell, "event::contact-quick-add-email", + G_CALLBACK (book_shell_backend_quick_add_email_cb), NULL); + + g_signal_connect_swapped ( + shell, "event::contact-quick-add-vcard", + G_CALLBACK (book_shell_backend_quick_add_vcard_cb), NULL); + g_signal_connect_swapped ( shell, "handle-uri", G_CALLBACK (book_shell_backend_handle_uri_cb), diff --git a/modules/calendar/e-memo-shell-content.c b/modules/calendar/e-memo-shell-content.c index 027beec1cd..0e8d73bbe5 100644 --- a/modules/calendar/e-memo-shell-content.c +++ b/modules/calendar/e-memo-shell-content.c @@ -200,7 +200,7 @@ memo_shell_content_cursor_change_cb (EMemoShellContent *memo_shell_content, memo_preview = e_memo_shell_content_get_memo_preview (memo_shell_content); if (e_table_selected_count (table) != 1) { - e_cal_component_preview_clear (memo_preview); + e_web_view_clear (E_WEB_VIEW (memo_preview)); return; } @@ -231,7 +231,7 @@ memo_shell_content_selection_change_cb (EMemoShellContent *memo_shell_content, /* XXX Old code emits a "selection-changed" signal here. */ if (e_table_selected_count (table) != 1) - e_cal_component_preview_clear (memo_preview); + e_web_view_clear (E_WEB_VIEW (memo_preview)); } static void @@ -391,6 +391,7 @@ memo_shell_content_constructed (GObject *object) EShellSettings *shell_settings; EShellBackend *shell_backend; EShellContent *shell_content; + EShellTaskbar *shell_taskbar; GalViewInstance *view_instance; icaltimezone *timezone; ETable *table; @@ -407,6 +408,7 @@ memo_shell_content_constructed (GObject *object) shell_content = E_SHELL_CONTENT (object); shell_view = e_shell_content_get_shell_view (shell_content); shell_backend = e_shell_view_get_shell_backend (shell_view); + shell_taskbar = e_shell_view_get_shell_taskbar (shell_view); shell = e_shell_backend_get_shell (shell_backend); shell_settings = e_shell_get_shell_settings (shell); @@ -458,6 +460,11 @@ memo_shell_content_constructed (GObject *object) priv->memo_preview = g_object_ref (widget); gtk_widget_show (widget); + g_signal_connect_swapped ( + widget, "status-message", + G_CALLBACK (e_shell_taskbar_set_message), + shell_taskbar); + /* Configure the memo table. */ widget = E_MEMO_TABLE (priv->memo_table)->etable; diff --git a/modules/calendar/e-memo-shell-view-actions.c b/modules/calendar/e-memo-shell-view-actions.c index 99761b2c74..463e01f71b 100644 --- a/modules/calendar/e-memo-shell-view-actions.c +++ b/modules/calendar/e-memo-shell-view-actions.c @@ -97,7 +97,7 @@ action_memo_delete_cb (GtkAction *action, e_memo_table_delete_selected (memo_table); e_memo_shell_view_set_status_message (memo_shell_view, NULL, -1.0); - e_cal_component_preview_clear (memo_preview); + e_web_view_clear (E_WEB_VIEW (memo_preview)); } static void diff --git a/modules/calendar/e-memo-shell-view-private.c b/modules/calendar/e-memo-shell-view-private.c index 0a96d29664..f1d331fab3 100644 --- a/modules/calendar/e-memo-shell-view-private.c +++ b/modules/calendar/e-memo-shell-view-private.c @@ -24,24 +24,6 @@ #include "widgets/menus/gal-view-factory-etable.h" static void -memo_shell_view_preview_on_url_cb (EShellView *shell_view, - const gchar *url) -{ - EShellTaskbar *shell_taskbar; - gchar *message; - - shell_taskbar = e_shell_view_get_shell_taskbar (shell_view); - - if (url == NULL || *url == '\0') - e_shell_taskbar_set_message (shell_taskbar, NULL); - else { - message = g_strdup_printf (_("Click to open %s"), url); - e_shell_taskbar_set_message (shell_taskbar, message); - g_free (message); - } -} - -static void memo_shell_view_table_popup_event_cb (EShellView *shell_view, GdkEventButton *event) { @@ -189,7 +171,6 @@ e_memo_shell_view_private_constructed (EMemoShellView *memo_shell_view) EShellContent *shell_content; EShellSidebar *shell_sidebar; EShellWindow *shell_window; - ECalComponentPreview *memo_preview; EMemoTable *memo_table; ECalModel *model; ETable *table; @@ -210,7 +191,6 @@ e_memo_shell_view_private_constructed (EMemoShellView *memo_shell_view) priv->memo_shell_sidebar = g_object_ref (shell_sidebar); memo_shell_content = E_MEMO_SHELL_CONTENT (shell_content); - memo_preview = e_memo_shell_content_get_memo_preview (memo_shell_content); memo_table = e_memo_shell_content_get_memo_table (memo_shell_content); model = e_memo_table_get_model (memo_table); table = e_memo_table_get_table (memo_table); @@ -224,11 +204,6 @@ e_memo_shell_view_private_constructed (EMemoShellView *memo_shell_view) memo_shell_view); g_signal_connect_swapped ( - memo_preview, "on-url", - G_CALLBACK (memo_shell_view_preview_on_url_cb), - memo_shell_view); - - g_signal_connect_swapped ( memo_table, "open-component", G_CALLBACK (e_memo_shell_view_open_memo), memo_shell_view); diff --git a/modules/calendar/e-memo-shell-view.c b/modules/calendar/e-memo-shell-view.c index 54dea9c444..ea869b55c4 100644 --- a/modules/calendar/e-memo-shell-view.c +++ b/modules/calendar/e-memo-shell-view.c @@ -151,7 +151,7 @@ memo_shell_view_execute_search (EShellView *shell_view) memo_preview = e_memo_shell_content_get_memo_preview (memo_shell_content); - e_cal_component_preview_clear (memo_preview); + e_web_view_clear (E_WEB_VIEW (memo_preview)); } static void diff --git a/modules/calendar/e-task-shell-content.c b/modules/calendar/e-task-shell-content.c index f78f142d60..8dea4b840b 100644 --- a/modules/calendar/e-task-shell-content.c +++ b/modules/calendar/e-task-shell-content.c @@ -201,7 +201,7 @@ task_shell_content_cursor_change_cb (ETaskShellContent *task_shell_content, task_preview = e_task_shell_content_get_task_preview (task_shell_content); if (e_table_selected_count (table) != 1) { - e_cal_component_preview_clear (task_preview); + e_web_view_clear (E_WEB_VIEW (task_preview)); return; } @@ -230,7 +230,7 @@ task_shell_content_selection_change_cb (ETaskShellContent *task_shell_content, task_preview = e_task_shell_content_get_task_preview (task_shell_content); if (e_table_selected_count (table) != 1) - e_cal_component_preview_clear (task_preview); + e_web_view_clear (E_WEB_VIEW (task_preview)); } static void @@ -388,6 +388,7 @@ task_shell_content_constructed (GObject *object) EShell *shell; EShellSettings *shell_settings; EShellContent *shell_content; + EShellTaskbar *shell_taskbar; EShellWindow *shell_window; EShellView *shell_view; GalViewInstance *view_instance; @@ -405,6 +406,7 @@ task_shell_content_constructed (GObject *object) shell_content = E_SHELL_CONTENT (object); shell_view = e_shell_content_get_shell_view (shell_content); + shell_taskbar = e_shell_view_get_shell_taskbar (shell_view); 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); @@ -456,6 +458,11 @@ task_shell_content_constructed (GObject *object) priv->task_preview = g_object_ref (widget); gtk_widget_show (widget); + g_signal_connect_swapped ( + widget, "status-message", + G_CALLBACK (e_shell_taskbar_set_message), + shell_taskbar); + /* Configure the task table. */ widget = E_CALENDAR_TABLE (priv->task_table)->etable; diff --git a/modules/calendar/e-task-shell-view-actions.c b/modules/calendar/e-task-shell-view-actions.c index 7833873832..2592df2481 100644 --- a/modules/calendar/e-task-shell-view-actions.c +++ b/modules/calendar/e-task-shell-view-actions.c @@ -128,7 +128,7 @@ action_task_delete_cb (GtkAction *action, e_calendar_table_delete_selected (task_table); e_task_shell_view_set_status_message (task_shell_view, NULL, -1.0); - e_cal_component_preview_clear (task_preview); + e_web_view_clear (E_WEB_VIEW (task_preview)); } static void diff --git a/modules/calendar/e-task-shell-view-private.c b/modules/calendar/e-task-shell-view-private.c index 380d54ef3d..581ad88b47 100644 --- a/modules/calendar/e-task-shell-view-private.c +++ b/modules/calendar/e-task-shell-view-private.c @@ -47,24 +47,6 @@ task_shell_view_process_completed_tasks (ETaskShellView *task_shell_view) } static void -task_shell_view_preview_on_url_cb (EShellView *shell_view, - const gchar *url) -{ - EShellTaskbar *shell_taskbar; - gchar *message; - - shell_taskbar = e_shell_view_get_shell_taskbar (shell_view); - - if (url == NULL || *url == '\0') - e_shell_taskbar_set_message (shell_taskbar, NULL); - else { - message = g_strdup_printf (_("Click to open %s"), url); - e_shell_taskbar_set_message (shell_taskbar, message); - g_free (message); - } -} - -static void task_shell_view_table_popup_event_cb (EShellView *shell_view, GdkEventButton *event) { @@ -235,10 +217,10 @@ e_task_shell_view_private_constructed (ETaskShellView *task_shell_view) EShellView *shell_view; EShellBackend *shell_backend; EShellContent *shell_content; - EShellSettings *shell_settings; EShellSidebar *shell_sidebar; + EShellTaskbar *shell_taskbar; + EShellSettings *shell_settings; EShellWindow *shell_window; - ECalComponentPreview *task_preview; ECalendarTable *task_table; ECalModel *model; ETable *table; @@ -248,6 +230,7 @@ e_task_shell_view_private_constructed (ETaskShellView *task_shell_view) shell_backend = e_shell_view_get_shell_backend (shell_view); shell_content = e_shell_view_get_shell_content (shell_view); shell_sidebar = e_shell_view_get_shell_sidebar (shell_view); + shell_taskbar = e_shell_view_get_shell_taskbar (shell_view); shell_window = e_shell_view_get_shell_window (shell_view); shell = e_shell_window_get_shell (shell_window); @@ -262,7 +245,6 @@ e_task_shell_view_private_constructed (ETaskShellView *task_shell_view) priv->task_shell_sidebar = g_object_ref (shell_sidebar); task_shell_content = E_TASK_SHELL_CONTENT (shell_content); - task_preview = e_task_shell_content_get_task_preview (task_shell_content); task_table = e_task_shell_content_get_task_table (task_shell_content); model = e_calendar_table_get_model (task_table); table = e_calendar_table_get_table (task_table); @@ -276,11 +258,6 @@ e_task_shell_view_private_constructed (ETaskShellView *task_shell_view) task_shell_view); g_signal_connect_swapped ( - task_preview, "on-url", - G_CALLBACK (task_shell_view_preview_on_url_cb), - task_shell_view); - - g_signal_connect_swapped ( task_table, "open-component", G_CALLBACK (e_task_shell_view_open_task), task_shell_view); diff --git a/modules/calendar/e-task-shell-view.c b/modules/calendar/e-task-shell-view.c index 7237b1cddd..650037b730 100644 --- a/modules/calendar/e-task-shell-view.c +++ b/modules/calendar/e-task-shell-view.c @@ -263,7 +263,7 @@ task_shell_view_execute_search (EShellView *shell_view) task_preview = e_task_shell_content_get_task_preview (task_shell_content); - e_cal_component_preview_clear (task_preview); + e_web_view_clear (E_WEB_VIEW (task_preview)); } static void diff --git a/modules/mail/e-mail-shell-content.c b/modules/mail/e-mail-shell-content.c index ac740fb6c5..60ddde7727 100644 --- a/modules/mail/e-mail-shell-content.c +++ b/modules/mail/e-mail-shell-content.c @@ -438,7 +438,7 @@ mail_shell_content_constructed (GObject *object) GConfBridge *bridge; GtkWidget *container; GtkWidget *widget; - GtkHTML *html; + EWebView *web_view; GalViewCollection *view_collection; const gchar *key; @@ -454,7 +454,7 @@ mail_shell_content_constructed (GObject *object) shell_backend = e_shell_view_get_shell_backend (shell_view); view_collection = shell_view_class->view_collection; - html = EM_FORMAT_HTML (priv->html_display)->html; + web_view = E_WEB_VIEW (EM_FORMAT_HTML (priv->html_display)->html); /* Build content widgets. */ @@ -492,12 +492,12 @@ mail_shell_content_constructed (GObject *object) GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_shadow_type ( GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN); - gtk_container_add (GTK_CONTAINER (widget), GTK_WIDGET (html)); + gtk_container_add (GTK_CONTAINER (widget), GTK_WIDGET (web_view)); gtk_box_pack_start (GTK_BOX (container), widget, TRUE, TRUE, 0); - gtk_widget_show (GTK_WIDGET (html)); + gtk_widget_show (GTK_WIDGET (web_view)); gtk_widget_show (widget); - widget = e_mail_search_bar_new (html); + widget = e_mail_search_bar_new (web_view); gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0); priv->search_bar = g_object_ref (widget); gtk_widget_hide (widget); diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c index adb288d8fb..9c79164a35 100644 --- a/modules/mail/e-mail-shell-view-actions.c +++ b/modules/mail/e-mail-shell-view-actions.c @@ -681,7 +681,7 @@ action_mail_smart_backward_cb (GtkAction *action, html = EM_FORMAT_HTML (html_display)->html; - if (gtk_html_command (html, "scroll-backward")) + if (e_web_view_scroll_backward (E_WEB_VIEW (html))) return; if (caret_mode || !magic_spacebar) @@ -744,7 +744,7 @@ action_mail_smart_forward_cb (GtkAction *action, html = EM_FORMAT_HTML (html_display)->html; - if (gtk_html_command (html, "scroll-forward")) + if (e_web_view_scroll_forward (E_WEB_VIEW (html))) return; if (caret_mode || !magic_spacebar) diff --git a/modules/mail/e-mail-shell-view-private.h b/modules/mail/e-mail-shell-view-private.h index 30724b26b5..5c52e1251c 100644 --- a/modules/mail/e-mail-shell-view-private.h +++ b/modules/mail/e-mail-shell-view-private.h @@ -36,6 +36,7 @@ #include "e-util/gconf-bridge.h" #include "e-util/e-account-utils.h" #include "filter/filter-part.h" +#include "widgets/misc/e-web-view.h" #include "widgets/misc/e-popup-action.h" #include "widgets/menus/gal-view-instance.h" |