[Commits] mimeview.c 1.83.2.178 1.83.2.179 textview.c 1.96.2.235 1.96.2.236 textview.h 1.12.2.27 1.12.2.28
pawel at claws-mail.org
pawel at claws-mail.org
Mon Nov 7 22:21:51 CET 2011
Update of /home/claws-mail/claws/src
In directory claws-mail:/tmp/cvs-serv12817/src
Modified Files:
Tag: gtk2
mimeview.c textview.c textview.h
Log Message:
2011-11-07 [pawel] 3.7.10cvs77
* src/mimeview.c
* src/textview.c
* src/textview.h
Make Home & End keys work in textview
Index: mimeview.c
===================================================================
RCS file: /home/claws-mail/claws/src/mimeview.c,v
retrieving revision 1.83.2.178
retrieving revision 1.83.2.179
diff -u -d -r1.83.2.178 -r1.83.2.179
--- mimeview.c 6 Nov 2011 11:24:29 -0000 1.83.2.178
+++ mimeview.c 7 Nov 2011 21:21:48 -0000 1.83.2.179
@@ -473,7 +473,6 @@
const gchar *file)
{
GtkCMCTree *ctree = GTK_CMCTREE(mimeview->ctree);
- GtkCMCTreeNode *node;
mimeview_clear(mimeview);
@@ -1444,6 +1443,11 @@
return FALSE;
switch (event->keyval) {
+ case GDK_KEY_Home:
+ case GDK_KEY_End:
+ textview_scroll_max(mimeview->textview,
+ (event->keyval == GDK_KEY_Home));
+ return TRUE;
case GDK_KEY_Page_Down:
case GDK_KEY_space:
if (mimeview_scroll_page(mimeview,
Index: textview.c
===================================================================
RCS file: /home/claws-mail/claws/src/textview.c,v
retrieving revision 1.96.2.235
retrieving revision 1.96.2.236
diff -u -d -r1.96.2.235 -r1.96.2.236
--- textview.c 7 Oct 2011 09:40:15 -0000 1.96.2.235
+++ textview.c 7 Nov 2011 21:21:48 -0000 1.96.2.236
@@ -2262,6 +2262,23 @@
return gtkutils_scroll_page(GTK_WIDGET(text), vadj, up);
}
+void textview_scroll_max(TextView *textview, gboolean up)
+{
+ GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview->text));
+ GtkTextIter iter;
+
+ if (up) {
+ gtk_text_buffer_get_start_iter(buffer, &iter);
+ gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(textview->text),
+ &iter, 0.0, TRUE, 0.0, 1.0);
+
+ } else {
+ gtk_text_buffer_get_end_iter(buffer, &iter);
+ gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(textview->text),
+ &iter, 0.0, TRUE, 0.0, 0.0);
+ }
+}
+
#define KEY_PRESS_EVENT_STOP() \
g_signal_stop_emission_by_name(G_OBJECT(widget), \
"key_press_event");
@@ -2279,17 +2296,19 @@
switch (event->keyval) {
case GDK_KEY_Tab:
- case GDK_KEY_Home:
case GDK_KEY_Left:
case GDK_KEY_Up:
case GDK_KEY_Right:
case GDK_KEY_Down:
case GDK_KEY_Page_Up:
case GDK_KEY_Page_Down:
- case GDK_KEY_End:
case GDK_KEY_Control_L:
case GDK_KEY_Control_R:
return FALSE;
+ case GDK_KEY_Home:
+ case GDK_KEY_End:
+ textview_scroll_max(textview,(event->keyval == GDK_KEY_Home));
+ return TRUE;
case GDK_KEY_space:
if (summaryview)
summary_pass_key_press_event(summaryview, event);
Index: textview.h
===================================================================
RCS file: /home/claws-mail/claws/src/textview.h,v
retrieving revision 1.12.2.27
retrieving revision 1.12.2.28
diff -u -d -r1.12.2.27 -r1.12.2.28
--- textview.h 16 Feb 2011 07:16:17 -0000 1.12.2.27
+++ textview.h 7 Nov 2011 21:21:49 -0000 1.12.2.28
@@ -108,6 +108,8 @@
gboolean up);
gboolean textview_scroll_page (TextView *textview,
gboolean up);
+void textview_scroll_max (TextView *textview,
+ gboolean up);
gboolean textview_search_string (TextView *textview,
const gchar *str,
More information about the Commits
mailing list