[gnome-contacts] Add workaround for not yet existing Gtk.MenuButton.set_popup ()



commit fde46c9c53ccff0f85e894fc7668dedfc92c3791
Author: Robert Ancell <robert ancell canonical com>
Date:   Fri Dec 21 11:50:42 2012 +1300

    Add workaround for not yet existing Gtk.MenuButton.set_popup ()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690579

 src/contacts-contact-pane.vala |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/contacts-contact-pane.vala b/src/contacts-contact-pane.vala
index 06932f0..687d862 100644
--- a/src/contacts-contact-pane.vala
+++ b/src/contacts-contact-pane.vala
@@ -22,6 +22,9 @@ using Gee;
 
 const int PROFILE_SIZE = 128;
 
+/* Not available until Vala 0.19 */
+extern void gtk_menu_button_set_popup (Gtk.MenuButton button, Gtk.Widget popup);
+
 namespace Contacts {
   public static void change_avatar (Contact contact, ContactFrame image_frame) {
     var dialog = new AvatarDialog (contact);
@@ -339,7 +342,9 @@ public class Contacts.ContactPane : Grid {
 	editor.add_new_row_for_property (contact.find_primary_persona (), "notes");
       });
     details_menu.show_all ();
-    add_detail_button.set_popup (details_menu);
+    /* Not available until Vala 0.19 */
+    //add_detail_button.set_popup (details_menu);
+    gtk_menu_button_set_popup (add_detail_button, details_menu);
     add_detail_button.set_direction (ArrowType.UP);
 
     var tool_item = new ToolItem ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]