aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-06-02 12:29:06 +0800
committerDan Winship <danw@src.gnome.org>2000-06-02 12:29:06 +0800
commita161070ec2a2de0527a9b442f11d29a6749db122 (patch)
treeb06bd2b4fd723c9fd375450d27408b4a6c68a811 /mail
parent0dbb51b1475c924936803496aeeb2f3795804066 (diff)
downloadgsoc2013-evolution-a161070ec2a2de0527a9b442f11d29a6749db122.tar
gsoc2013-evolution-a161070ec2a2de0527a9b442f11d29a6749db122.tar.gz
gsoc2013-evolution-a161070ec2a2de0527a9b442f11d29a6749db122.tar.bz2
gsoc2013-evolution-a161070ec2a2de0527a9b442f11d29a6749db122.tar.lz
gsoc2013-evolution-a161070ec2a2de0527a9b442f11d29a6749db122.tar.xz
gsoc2013-evolution-a161070ec2a2de0527a9b442f11d29a6749db122.tar.zst
gsoc2013-evolution-a161070ec2a2de0527a9b442f11d29a6749db122.zip
Connect to ETable's key_press signal. (etable_key): scroll mail on
* folder-browser.c (my_folder_browser_init): Connect to ETable's key_press signal. (etable_key): scroll mail on space/backspace. svn path=/trunk/; revision=3375
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog14
-rw-r--r--mail/folder-browser.c32
2 files changed, 43 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 7e8a5fe4d5..7e18f0094b 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,14 +1,22 @@
+2000-06-02 Dan Winship <danw@helixcode.com>
+
+ * folder-browser.c (my_folder_browser_init): Connect to ETable's
+ key_press signal.
+ (etable_key): scroll mail on space/backspace.
+
2000-06-02 Christopher James Lahey <clahey@helixcode.com>
* message-list.c: Made sent column as wide as from column.
2000-06-02 Jeffrey Stedfast <fejj@helixcode.com>
- * mail-config.c (on_cmdSourcesAdd_clicked): Changed identity_row to source_row
- as this is a Sources clist we are dealing with and not an identity clist
+ * mail-config.c (on_cmdSourcesAdd_clicked): Changed identity_row
+ to source_row as this is a Sources clist we are dealing with and
+ not an identity clist
(on_cmdSourcesEdit_clicked): same
(on_cmdSourcesDelete_clicked): again, same
- (on_cmdSourcesEdit_clicked): Source editor now fills in data from the clist
+ (on_cmdSourcesEdit_clicked): Source editor now fills in data from
+ the clist
2000-06-01 Dan Winship <danw@helixcode.com>
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index 426d163bd6..7b45afb989 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -349,6 +349,35 @@ search_activate(GtkEntry *entry, FolderBrowser *fb)
search_set(fb);
}
+static int
+etable_key (ETable *table, int row, int col, GdkEvent *ev, FolderBrowser *fb)
+{
+ if (ev->key.state != 0)
+ return FALSE;
+
+ if (ev->key.keyval == GDK_space || ev->key.keyval == GDK_BackSpace) {
+ GtkAdjustment *vadj;
+
+ vadj = e_scroll_frame_get_vadjustment (fb->mail_display->scroll);
+ if (ev->key.keyval == GDK_BackSpace) {
+ if (vadj->value > vadj->lower + vadj->page_size)
+ vadj->value -= vadj->page_size;
+ else
+ vadj->value = vadj->lower;
+ } else {
+ if (vadj->value < vadj->upper - 2 * vadj->page_size)
+ vadj->value += vadj->page_size;
+ else
+ vadj->value = vadj->upper - vadj->page_size;
+ }
+
+ gtk_adjustment_value_changed (vadj);
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
static void
folder_browser_gui_init (FolderBrowser *fb)
{
@@ -421,6 +450,9 @@ my_folder_browser_init (GtkObject *object)
fb->message_list = MESSAGE_LIST (message_list_new (fb));
fb->mail_display = MAIL_DISPLAY (mail_display_new (fb));
+ gtk_signal_connect (GTK_OBJECT (fb->message_list->etable),
+ "key_press", GTK_SIGNAL_FUNC (etable_key), fb);
+
folder_browser_properties_init (fb);
folder_browser_gui_init (fb);
}