summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorWilliam Hua <william.hua@canonical.com>2016-07-12 14:08:36 -0400
committerWilliam Hua <william.hua@canonical.com>2016-07-19 09:38:54 -0400
commit8701e34f749cf196c9726c01c03f35ce4eb39836 (patch)
tree1608d0bcc69917633b1640dfa7a3651158868880 /demos
parent05b9bc5cff5f2bd625412ddac2184af8c026895b (diff)
downloadgtk+-8701e34f749cf196c9726c01c03f35ce4eb39836.tar.gz
port to new gtk_menu_popup_at_* () functions
https://bugzilla.gnome.org/show_bug.cgi?id=756579
Diffstat (limited to 'demos')
-rw-r--r--demos/gtk-demo/clipboard.c2
-rw-r--r--demos/gtk-demo/main.c2
-rw-r--r--demos/gtk-demo/search_entry.c3
3 files changed, 3 insertions, 4 deletions
diff --git a/demos/gtk-demo/clipboard.c b/demos/gtk-demo/clipboard.c
index f04a203bb0..8bb44e9ed9 100644
--- a/demos/gtk-demo/clipboard.c
+++ b/demos/gtk-demo/clipboard.c
@@ -193,7 +193,7 @@ button_press (GtkWidget *widget,
gtk_widget_show (item);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 3, button->time);
+ gtk_menu_popup_at_pointer (GTK_MENU (menu), (GdkEvent *) button);
return TRUE;
}
diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c
index a6adc6a52f..923030f02b 100644
--- a/demos/gtk-demo/main.c
+++ b/demos/gtk-demo/main.c
@@ -966,7 +966,7 @@ end_cb (GtkMenuItem *item, GtkWidget *scrollbar)
static gboolean
scrollbar_popup (GtkWidget *scrollbar, GtkWidget *menu)
{
- gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time ());
+ gtk_menu_popup_at_pointer (GTK_MENU (menu), NULL);
return TRUE;
}
diff --git a/demos/gtk-demo/search_entry.c b/demos/gtk-demo/search_entry.c
index 8573aa1e89..63df73cb00 100644
--- a/demos/gtk-demo/search_entry.c
+++ b/demos/gtk-demo/search_entry.c
@@ -157,8 +157,7 @@ icon_press_cb (GtkEntry *entry,
gpointer data)
{
if (position == GTK_ENTRY_ICON_PRIMARY)
- gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL,
- event->button, event->time);
+ gtk_menu_popup_at_pointer (GTK_MENU (menu), (GdkEvent *) event);
}
static void