aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-individual-view.c
diff options
context:
space:
mode:
authorKushal Das <kushal@fedoraproject.org>2011-01-11 20:19:18 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-02-02 18:29:56 +0800
commit36eebcaac08dc60f64f05b883bc6a94a8468561b (patch)
treeb8eb587f908673b47ea47305d5fdf7da7bf7c633 /libempathy-gtk/empathy-individual-view.c
parent70f1296e9b6a73cbaf0e0c2748df412c1152338a (diff)
downloadgsoc2013-empathy-36eebcaac08dc60f64f05b883bc6a94a8468561b.tar
gsoc2013-empathy-36eebcaac08dc60f64f05b883bc6a94a8468561b.tar.gz
gsoc2013-empathy-36eebcaac08dc60f64f05b883bc6a94a8468561b.tar.bz2
gsoc2013-empathy-36eebcaac08dc60f64f05b883bc6a94a8468561b.tar.lz
gsoc2013-empathy-36eebcaac08dc60f64f05b883bc6a94a8468561b.tar.xz
gsoc2013-empathy-36eebcaac08dc60f64f05b883bc6a94a8468561b.tar.zst
gsoc2013-empathy-36eebcaac08dc60f64f05b883bc6a94a8468561b.zip
Pressing F2 opens the Edit Contact Information window for #586257
Diffstat (limited to 'libempathy-gtk/empathy-individual-view.c')
-rw-r--r--libempathy-gtk/empathy-individual-view.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index 1eeaa0d4e..dedded072 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -47,6 +47,7 @@
#include "empathy-individual-view.h"
#include "empathy-individual-menu.h"
#include "empathy-individual-store.h"
+#include "empathy-contact-dialogs.h"
#include "empathy-images.h"
#include "empathy-linking-dialog.h"
#include "empathy-cell-renderer-expander.h"
@@ -891,6 +892,25 @@ individual_view_key_press_event_cb (EmpathyIndividualView *view,
data->button = 0;
data->time = event->time;
g_idle_add (individual_view_popup_menu_idle_cb, data);
+ } else if (event->keyval == GDK_KEY_F2) {
+ FolksIndividual *individual;
+ EmpathyContact *contact;
+
+ g_return_val_if_fail (EMPATHY_IS_INDIVIDUAL_VIEW (view), FALSE);
+
+ individual = empathy_individual_view_dup_selected (view);
+ if (individual == NULL)
+ return FALSE;
+
+ contact = empathy_contact_dup_from_folks_individual (individual);
+ if (contact == NULL) {
+ g_object_unref (individual);
+ return FALSE;
+ }
+ empathy_contact_edit_dialog_show (contact, NULL);
+
+ g_object_unref (individual);
+ g_object_unref (contact);
}
return FALSE;
@@ -1314,7 +1334,8 @@ individual_view_search_key_navigation_cb (GtkWidget *search,
GdkEventKey *eventkey = ((GdkEventKey *) event);
gboolean ret = FALSE;
- if (eventkey->keyval == GDK_Up || eventkey->keyval == GDK_Down)
+ if (eventkey->keyval == GDK_KEY_Up || eventkey->keyval == GDK_KEY_Down
+ || eventkey->keyval == GDK_KEY_F2)
{
GdkEvent *new_event;