pidgin/gtk3compat.h

changeset 38707
6f4d3ab2f2ed
parent 38007
3b971d2ecae1
child 39673
d02350b7261b
equal deleted inserted replaced
38706:4a3f253ea22c 38707:6f4d3ab2f2ed
31 * Also, any public API should not depend on this file. 31 * Also, any public API should not depend on this file.
32 */ 32 */
33 33
34 #include <gtk/gtk.h> 34 #include <gtk/gtk.h>
35 35
36 #if !GTK_CHECK_VERSION(3,22,0)
37
38 static inline void
39 gtk_menu_popup_at_pointer(GtkMenu *menu, const GdkEvent *trigger_event)
40 {
41 const GdkEventButton *event = (const GdkEventButton *)trigger_event;
42 gtk_menu_popup(menu, NULL, NULL, NULL, NULL,
43 event ? event->button : 0, gdk_event_get_time(event));
44 }
45
36 #if !GTK_CHECK_VERSION(3,16,0) 46 #if !GTK_CHECK_VERSION(3,16,0)
37 47
38 static inline void 48 static inline void
39 gtk_label_set_xalign(GtkLabel *label, gfloat xalign) 49 gtk_label_set_xalign(GtkLabel *label, gfloat xalign)
40 { 50 {
47 g_object_set(label, "yalign", yalign, NULL); 57 g_object_set(label, "yalign", yalign, NULL);
48 } 58 }
49 59
50 #endif /* 3.16.0 */ 60 #endif /* 3.16.0 */
51 61
62 #endif /* 3.22.0 */
63
52 #endif /* _PIDGINGTK3COMPAT_H_ */ 64 #endif /* _PIDGINGTK3COMPAT_H_ */
53 65

mercurial