diff options
author | Srinivasa Ragavan <sragavan@novell.com> | 2006-01-16 02:46:56 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2006-01-16 02:46:56 +0800 |
commit | e0cbc1924b691286339165336aff655e40162ec6 (patch) | |
tree | dcb637478dbceb51c26e817c62dbf685fe240370 /mail/em-format-html-display.c | |
parent | 64ba00a2b29516a152709a612fa70d571d205c1a (diff) | |
download | gsoc2013-evolution-e0cbc1924b691286339165336aff655e40162ec6.tar.gz gsoc2013-evolution-e0cbc1924b691286339165336aff655e40162ec6.tar.zst gsoc2013-evolution-e0cbc1924b691286339165336aff655e40162ec6.zip |
** Fixes bug #239929 (Committing Rajeev's patch)
2006-01-16 Srinivasa Ragavan <sragavan@novell.com>
** 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
Diffstat (limited to 'mail/em-format-html-display.c')
-rw-r--r-- | mail/em-format-html-display.c | 20 |
1 files changed, 20 insertions, 0 deletions
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 <glib.h> #include <glib/gstdio.h> +#include <gdk/gdkkeysyms.h> #ifdef G_OS_WIN32 /* Work around 'DATADIR' and 'interface' lossage in <windows.h> */ @@ -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; } |