From e0cbc1924b691286339165336aff655e40162ec6 Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Sun, 15 Jan 2006 18:46:56 +0000 Subject: ** Fixes bug #239929 (Committing Rajeev's patch) 2006-01-16 Srinivasa Ragavan ** Fixes bug #239929 (Committing Rajeev's patch) * em-format-html-display.c: (efhd_scroll_event), (em_format_html_display_new):Adds handler to zoom-in/out on control scroll. svn path=/trunk/; revision=31186 --- mail/ChangeLog | 8 ++++++++ mail/em-format-html-display.c | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/mail/ChangeLog b/mail/ChangeLog index 016b417ba3..c46b4f64b6 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,11 @@ +2006-01-16 Srinivasa Ragavan + + ** Fixes bug #239929 (Committing Rajeev's patch) + + * em-format-html-display.c: (efhd_scroll_event), + (em_format_html_display_new):Adds handler to zoom-in/out on control + scroll. + 2006-01-13 Srinivasa Ragavan * em-folder-browser.c: (emfb_etree_unfreeze), (emfb_list_built): diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index 54cc0c4448..56fd88b37c 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -28,6 +28,7 @@ #include #include +#include #ifdef G_OS_WIN32 /* Work around 'DATADIR' and 'interface' lossage in */ @@ -399,6 +400,24 @@ em_format_html_display_get_type(void) return type; } +static gboolean +efhd_scroll_event(GtkWidget *w, GdkEventScroll *event, EMFormatHTMLDisplay *efhd) +{ + if(event->state & GDK_CONTROL_MASK) + { + if(event->direction == GDK_SCROLL_UP) + { + gtk_html_zoom_in (efhd->formathtml.html); + } + else if(event->direction == GDK_SCROLL_DOWN) + { + gtk_html_zoom_out (efhd->formathtml.html); + } + return TRUE; + } + return FALSE; +} + EMFormatHTMLDisplay *em_format_html_display_new(void) { EMFormatHTMLDisplay *efhd; @@ -409,6 +428,7 @@ EMFormatHTMLDisplay *em_format_html_display_new(void) g_signal_connect(efhd->formathtml.html, "link_clicked", G_CALLBACK(efhd_html_link_clicked), efhd); g_signal_connect(efhd->formathtml.html, "on_url", G_CALLBACK(efhd_html_on_url), efhd); g_signal_connect(efhd->formathtml.html, "button_press_event", G_CALLBACK(efhd_html_button_press_event), efhd); + g_signal_connect(efhd->formathtml.html,"event", G_CALLBACK(efhd_scroll_event), efhd); return efhd; } -- cgit