Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2007-06-13 18:19:28 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2007-06-13 18:19:28 (GMT)
commit3c66cb899ff109c7351efaa64c8a88b543a68221 (patch)
tree194689daf12168d06391185632f0dd7751adaa88 /lib
parentd3e8ddb2780ecd0fc3535f8a1464d8ab9e9217e9 (diff)
Evil hack to keep the entry context menu working with our
title/address behavior.
Diffstat (limited to 'lib')
-rw-r--r--lib/sugar-address-entry.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/sugar-address-entry.c b/lib/sugar-address-entry.c
index 6b6ea0d..f776e6c 100644
--- a/lib/sugar-address-entry.c
+++ b/lib/sugar-address-entry.c
@@ -660,6 +660,21 @@ focus_out_event_cb(GtkWidget *widget, GdkEventFocus *event)
}
static void
+popup_unmap_cb(GtkWidget *popup, SugarAddressEntry *entry)
+{
+ g_signal_handlers_unblock_by_func(entry, focus_out_event_cb, NULL);
+}
+
+static void
+populate_popup_cb(SugarAddressEntry *entry, GtkWidget *menu)
+{
+ g_signal_handlers_block_by_func(entry, focus_out_event_cb, NULL);
+
+ g_signal_connect(menu, "unmap",
+ G_CALLBACK(popup_unmap_cb), entry);
+}
+
+static void
sugar_address_entry_init(SugarAddressEntry *entry)
{
entry->progress = 0.0;
@@ -674,4 +689,6 @@ sugar_address_entry_init(SugarAddressEntry *entry)
G_CALLBACK(entry_changed_cb), NULL);
g_signal_connect(entry, "button-press-event",
G_CALLBACK(button_press_event_cb), NULL);
+ g_signal_connect(entry, "populate-popup",
+ G_CALLBACK(populate_popup_cb), NULL);
}