[gtk+/gtk-3-22] Deprecate gtk_menu_popup and gtk_menu_popup_for_device
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-22] Deprecate gtk_menu_popup and gtk_menu_popup_for_device
- Date: Wed, 12 Oct 2016 17:51:06 +0000 (UTC)
commit dd9a9d9dcca9f02de1038ace3f278f8ef14a7052
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Oct 12 13:46:25 2016 -0400
Deprecate gtk_menu_popup and gtk_menu_popup_for_device
These functions don't work well on backends without global
coordinates (such as Wayland or Mir), and the gtk_menu_popup_at_
variants are better alternatives.
https://bugzilla.gnome.org/show_bug.cgi?id=772552
gtk/gtkmenu.c | 17 +++++++++++++++++
gtk/gtkmenu.h | 4 ++--
2 files changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index 8636bab..0488d1f 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -2039,7 +2039,15 @@ gtk_menu_popup_internal (GtkMenu *menu,
* Only if no such event is available, gtk_get_current_event_time() can
* be used instead.
*
+ * Note that this function does not work very well on GDK backends that
+ * do not have global coordinates, such as Wayland or Mir. You should
+ * probably use one of the gtk_menu_popup_at_ variants, which do not
+ * have this problem.
+ *
* Since: 3.0
+ *
+ * Deprecated: 3.22: Please use gtk_menu_popup_at_widget(),
+ * gtk_menu_popup_at_pointer(). or gtk_menu_popup_at_rect() instead
*/
void
gtk_menu_popup_for_device (GtkMenu *menu,
@@ -2103,6 +2111,14 @@ gtk_menu_popup_for_device (GtkMenu *menu,
* a mouse click or key press) that caused the initiation of the popup.
* Only if no such event is available, gtk_get_current_event_time() can
* be used instead.
+ *
+ * Note that this function does not work very well on GDK backends that
+ * do not have global coordinates, such as Wayland or Mir. You should
+ * probably use one of the gtk_menu_popup_at_ variants, which do not
+ * have this problem.
+ *
+ * Deprecated: 3.22: Please use gtk_menu_popup_at_widget(),
+ * gtk_menu_popup_at_pointer(). or gtk_menu_popup_at_rect() instead
*/
void
gtk_menu_popup (GtkMenu *menu,
@@ -2119,6 +2135,7 @@ gtk_menu_popup (GtkMenu *menu,
NULL,
parent_menu_shell,
parent_menu_item,
+
func, data, NULL,
button, activate_time);
}
diff --git a/gtk/gtkmenu.h b/gtk/gtkmenu.h
index 70c7c2f..ec5f8ed 100644
--- a/gtk/gtkmenu.h
+++ b/gtk/gtkmenu.h
@@ -134,7 +134,7 @@ GDK_AVAILABLE_IN_3_4
GtkWidget* gtk_menu_new_from_model (GMenuModel *model);
/* Display the menu onscreen */
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_22_FOR((gtk_menu_popup_at_widget, gtk_menu_popup_at_pointer, gtk_menu_popup_at_rect))
void gtk_menu_popup (GtkMenu *menu,
GtkWidget *parent_menu_shell,
GtkWidget *parent_menu_item,
@@ -142,7 +142,7 @@ void gtk_menu_popup (GtkMenu *menu,
gpointer data,
guint button,
guint32 activate_time);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_22_FOR((gtk_menu_popup_at_widget, gtk_menu_popup_at_pointer, gtk_menu_popup_at_rect))
void gtk_menu_popup_for_device (GtkMenu *menu,
GdkDevice *device,
GtkWidget *parent_menu_shell,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]