aboutsummaryrefslogtreecommitdiffstats
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-01-11 20:27:53 +0800
commitc4a806bea01fcb3862ab43e88eede77fca1ce7e0 (patch)
treedf24d6cf59b59db4dd7602245c355021c4fc36cd
parent2392932b2eed456f7d5b39d0a9eb839194dfb0e1 (diff)
downloadgsoc2013-empathy-c4a806bea01fcb3862ab43e88eede77fca1ce7e0.tar
gsoc2013-empathy-c4a806bea01fcb3862ab43e88eede77fca1ce7e0.tar.gz
gsoc2013-empathy-c4a806bea01fcb3862ab43e88eede77fca1ce7e0.tar.bz2
gsoc2013-empathy-c4a806bea01fcb3862ab43e88eede77fca1ce7e0.tar.lz
gsoc2013-empathy-c4a806bea01fcb3862ab43e88eede77fca1ce7e0.tar.xz
gsoc2013-empathy-c4a806bea01fcb3862ab43e88eede77fca1ce7e0.tar.zst
gsoc2013-empathy-c4a806bea01fcb3862ab43e88eede77fca1ce7e0.zip
Pressing F2 opens the Edit Contact Information window for #586257
-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 38ef61e54..e1007ae65 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"
@@ -947,6 +948,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;
@@ -1365,7 +1385,8 @@ individual_view_search_key_navigation_cb (GtkWidget *search,
GdkEventKey *eventkey = ((GdkEventKey *) event);
gboolean ret = FALSE;
- if (eventkey->keyval == GDK_KEY_Up || eventkey->keyval == GDK_KEY_Down)
+ if (eventkey->keyval == GDK_KEY_Up || eventkey->keyval == GDK_KEY_Down
+ || eventkey->keyval == GDK_KEY_F2)
{
GdkEvent *new_event;