~bcurtiswx/ubuntu/natty/empathy/empathy-2.33.3-0ubuntu1

« back to all changes in this revision

Viewing changes to debian/patches/00_git_F2_opens_contact_info.patch

  • Committer: robert.ancell at canonical
  • Date: 2011-02-01 02:42:33 UTC
  • mfrom: (161.1.2 ubuntu)
  • Revision ID: robert.ancell@canonical.com-20110201024233-h18c3ccqndiojdf7
Merge Brian's git patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From c4a806bea01fcb3862ab43e88eede77fca1ce7e0 Mon Sep 17 00:00:00 2001
 
2
From: Kushal Das <kushal@fedoraproject.org>
 
3
Date: Tue, 11 Jan 2011 12:19:18 +0000
 
4
Subject: Pressing F2 opens the Edit Contact Information window for #586257
 
5
 
 
6
---
 
7
Index: empathy-2.32.2/libempathy-gtk/empathy-individual-view.c
 
8
===================================================================
 
9
--- empathy-2.32.2.orig/libempathy-gtk/empathy-individual-view.c        2010-11-18 09:25:30.000000000 -0500
 
10
+++ empathy-2.32.2/libempathy-gtk/empathy-individual-view.c     2011-01-25 13:27:17.253997002 -0500
 
11
@@ -47,6 +47,7 @@
 
12
 #include "empathy-individual-view.h"
 
13
 #include "empathy-individual-menu.h"
 
14
 #include "empathy-individual-store.h"
 
15
+#include "empathy-contact-dialogs.h"
 
16
 #include "empathy-images.h"
 
17
 #include "empathy-linking-dialog.h"
 
18
 #include "empathy-cell-renderer-expander.h"
 
19
@@ -891,6 +892,25 @@
 
20
       data->button = 0;
 
21
       data->time = event->time;
 
22
       g_idle_add (individual_view_popup_menu_idle_cb, data);
 
23
+    } else if (event->keyval == GDK_KEY_F2) {
 
24
+        FolksIndividual *individual;
 
25
+        EmpathyContact *contact;
 
26
+
 
27
+        g_return_val_if_fail (EMPATHY_IS_INDIVIDUAL_VIEW (view), FALSE);
 
28
+
 
29
+        individual = empathy_individual_view_dup_selected (view);
 
30
+        if (individual == NULL)
 
31
+            return FALSE;
 
32
+
 
33
+        contact = empathy_contact_dup_from_folks_individual (individual);
 
34
+        if (contact == NULL) {
 
35
+            g_object_unref (individual);
 
36
+            return FALSE;
 
37
+        }
 
38
+        empathy_contact_edit_dialog_show (contact, NULL);
 
39
+
 
40
+        g_object_unref (individual);
 
41
+        g_object_unref (contact);
 
42
     }
 
43
 
 
44
   return FALSE;
 
45
@@ -1314,7 +1334,8 @@
 
46
   GdkEventKey *eventkey = ((GdkEventKey *) event);
 
47
   gboolean ret = FALSE;
 
48
 
 
49
-  if (eventkey->keyval == GDK_Up || eventkey->keyval == GDK_Down)
 
50
+  if (eventkey->keyval == GDK_KEY_Up || eventkey->keyval == GDK_KEY_Down
 
51
+      || eventkey->keyval == GDK_KEY_F2)
 
52
     {
 
53
       GdkEvent *new_event;
 
54