aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@novell.com>2006-01-16 02:46:56 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2006-01-16 02:46:56 +0800
commite0cbc1924b691286339165336aff655e40162ec6 (patch)
treedcb637478dbceb51c26e817c62dbf685fe240370
parent64ba00a2b29516a152709a612fa70d571d205c1a (diff)
downloadgsoc2013-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
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/em-format-html-display.c20
2 files changed, 28 insertions, 0 deletions
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 <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.
+
2006-01-13 Srinivasa Ragavan <sragavan@novell.com>
* 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 <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;
}