~ubuntu-branches/ubuntu/lucid/tomboy/lucid-proposed

« back to all changes in this revision

Viewing changes to debian/patches/04_armel_crasher_fix.patch

  • Committer: Bazaar Package Importer
  • Author(s): Oliver Grawert
  • Date: 2009-09-07 09:42:16 UTC
  • Revision ID: james.westby@ubuntu.com-20090907094216-roicseixedro5gup
Tags: 0.15.6-0ubuntu3
debian/patches/04_armel_crasher_fix.patch: new upstream patch to fix popup
menu crashes on armel and ppc (LP: #391124)
Thanks to Sandy Armstrong <sanfordarmstrong@gmail.com> for the fix

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Index: tomboy-0.15.6/Tomboy/RecentChanges.cs
 
2
===================================================================
 
3
--- tomboy-0.15.6.orig/Tomboy/RecentChanges.cs  2009-09-07 09:41:04.000000000 +0200
 
4
+++ tomboy-0.15.6/Tomboy/RecentChanges.cs       2009-09-07 09:41:13.000000000 +0200
 
5
@@ -838,11 +838,19 @@
 
6
                        if (x == 0 && y == 0)
 
7
                                pos_menu_func = PositionContextMenu;
 
8
 
 
9
-                       menu.Popup (null, null,
 
10
-                                   pos_menu_func,
 
11
-                                   0,
 
12
-                                   Gtk.Global.CurrentEventTime);
 
13
-               }
 
14
+                       try {
 
15
+                               menu.Popup (null, null,
 
16
+                                           pos_menu_func,
 
17
+                                           0,
 
18
+                                           Gtk.Global.CurrentEventTime);
 
19
+                       } catch {
 
20
+                               Logger.Debug ("Menu popup failed with custom MenuPositionFunc; trying again without");
 
21
+                               menu.Popup (null, null,
 
22
+                                           null,
 
23
+                                           0,
 
24
+                                           Gtk.Global.CurrentEventTime);
 
25
+                       }
 
26
+               }
 
27
 
 
28
                // This is needed for when the user opens
 
29
                // the context menu with the keyboard.
 
30
Index: tomboy-0.15.6/Tomboy/Utils.cs
 
31
===================================================================
 
32
--- tomboy-0.15.6.orig/Tomboy/Utils.cs  2009-09-07 09:40:49.000000000 +0200
 
33
+++ tomboy-0.15.6/Tomboy/Utils.cs       2009-09-07 09:41:20.000000000 +0200
 
34
@@ -61,26 +61,25 @@
 
35
                // calling this.
 
36
                public static void PopupMenu (Gtk.Menu menu, Gdk.EventButton ev)
 
37
                {
 
38
-                       menu.Deactivated += DeactivateMenu;
 
39
-                       menu.Popup (null,
 
40
-                                   null,
 
41
-                                   new Gtk.MenuPositionFunc (GetMenuPosition),
 
42
-                                   (ev == null) ? 0 : ev.Button,
 
43
-                                   (ev == null) ? Gtk.Global.CurrentEventTime : ev.Time);
 
44
-
 
45
-                       // Highlight the parent
 
46
-                       if (menu.AttachWidget != null)
 
47
-                               menu.AttachWidget.State = Gtk.StateType.Selected;
 
48
+                       PopupMenu (menu, ev, new Gtk.MenuPositionFunc (GetMenuPosition));
 
49
                }
 
50
 
 
51
                public static void PopupMenu (Gtk.Menu menu, Gdk.EventButton ev, Gtk.MenuPositionFunc mpf)
 
52
                {
 
53
-                       menu.Deactivated += DeactivateMenu;
 
54
-                       menu.Popup (null,
 
55
-                                   null,
 
56
-                                   mpf,
 
57
-                                   (ev == null) ? 0 : ev.Button,
 
58
-                                   (ev == null) ? Gtk.Global.CurrentEventTime : ev.Time);
 
59
+                       try {
 
60
+                               menu.Popup (null,
 
61
+                                           null,
 
62
+                                           mpf,
 
63
+                                           (ev == null) ? 0 : ev.Button,
 
64
+                                           (ev == null) ? Gtk.Global.CurrentEventTime : ev.Time);
 
65
+                       } catch {
 
66
+                               Logger.Debug ("Menu popup failed with custom MenuPositionFunc; trying again without");
 
67
+                               menu.Popup (null,
 
68
+                                           null,
 
69
+                                           null,
 
70
+                                           (ev == null) ? 0 : ev.Button,
 
71
+                                           (ev == null) ? Gtk.Global.CurrentEventTime : ev.Time);
 
72
+                       }
 
73
 
 
74
                        // Highlight the parent
 
75
                        if (menu.AttachWidget != null)