aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-10-29 19:35:01 +0800
committerMilan Crha <mcrha@redhat.com>2009-10-29 19:35:01 +0800
commit1f455a08558bac17ba1f33b3d53a6dde02cbeb31 (patch)
treebd684a09105c31419ee7c2259fdae5a41d15a123 /mail
parent2b7aa4a797fc0545e9774a42fdbd6afae5271c6d (diff)
downloadgsoc2013-evolution-1f455a08558bac17ba1f33b3d53a6dde02cbeb31.tar
gsoc2013-evolution-1f455a08558bac17ba1f33b3d53a6dde02cbeb31.tar.gz
gsoc2013-evolution-1f455a08558bac17ba1f33b3d53a6dde02cbeb31.tar.bz2
gsoc2013-evolution-1f455a08558bac17ba1f33b3d53a6dde02cbeb31.tar.lz
gsoc2013-evolution-1f455a08558bac17ba1f33b3d53a6dde02cbeb31.tar.xz
gsoc2013-evolution-1f455a08558bac17ba1f33b3d53a6dde02cbeb31.tar.zst
gsoc2013-evolution-1f455a08558bac17ba1f33b3d53a6dde02cbeb31.zip
Bug #268644 - unread mail shortcut collides with gtk tree search
Re-applied, as it got lost on kill-bonobo merge
Diffstat (limited to 'mail')
-rw-r--r--mail/em-folder-tree.c16
-rw-r--r--mail/em-folder-tree.h1
2 files changed, 17 insertions, 0 deletions
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index f1274f7c50..b683ef6802 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -118,6 +118,7 @@ enum {
FOLDER_ACTIVATED, /* aka double-clicked or user hit enter */
FOLDER_SELECTED,
POPUP_EVENT,
+ HIDDEN_KEY_EVENT,
LAST_SIGNAL
};
@@ -652,6 +653,12 @@ folder_tree_key_press_event (GtkWidget *widget,
GtkTreeSelection *selection;
GtkTreeView *tree_view;
+ if (event && event->type == GDK_KEY_PRESS && (event->keyval == GDK_space || event->keyval == '.' || event->keyval == ',' || event->keyval == '[' || event->keyval == ']')) {
+ g_signal_emit (widget, signals [HIDDEN_KEY_EVENT], 0, event);
+
+ return TRUE;
+ }
+
priv = EM_FOLDER_TREE_GET_PRIVATE (widget);
tree_view = GTK_TREE_VIEW (widget);
@@ -836,6 +843,15 @@ folder_tree_class_init (EMFolderTreeClass *class)
g_cclosure_marshal_VOID__BOXED,
G_TYPE_NONE, 1,
GDK_TYPE_EVENT | G_SIGNAL_TYPE_STATIC_SCOPE);
+
+ signals[HIDDEN_KEY_EVENT] =
+ g_signal_new ("hidden-key-event",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EMFolderTreeClass, hidden_key_event),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__BOXED,
+ G_TYPE_NONE, 1, GDK_TYPE_EVENT);
}
static void
diff --git a/mail/em-folder-tree.h b/mail/em-folder-tree.h
index cca5432306..02730cb09d 100644
--- a/mail/em-folder-tree.h
+++ b/mail/em-folder-tree.h
@@ -82,6 +82,7 @@ struct _EMFolderTreeClass {
const gchar *uri,
guint32 flags);
void (*popup_event) (EMFolderTree *folder_tree);
+ void (*hidden_key_event) (EMFolderTree *emft, GdkEvent *event);
};
GType em_folder_tree_get_type (void);