Replace Gtk3.22 deprecated function gtk_menu_popup

pull/158/head
Robert Fewell 9 years ago committed by Geert Janssens
parent d4faad8bf6
commit 54019608ee

@ -761,14 +761,15 @@ gnc_main_window_restore_window (GncMainWindow *window, GncMainWindowSaveData *da
g_warning("invalid number of values for group %s key %s", g_warning("invalid number of values for group %s key %s",
window_group, WINDOW_POSITION); window_group, WINDOW_POSITION);
} }
else if ((pos[0] + (geom ? geom[0] : 0) < 0) || // This does not do any thing ?
(pos[0] > gdk_screen_width()) || // else if ((pos[0] + (geom ? geom[0] : 0) < 0) ||
(pos[1] + (geom ? geom[1] : 0) < 0) || // (pos[0] > gdk_screen_width()) ||
(pos[1] > gdk_screen_height())) // (pos[1] + (geom ? geom[1] : 0) < 0) ||
{ // (pos[1] > gdk_screen_height()))
// {
// g_debug("position %dx%d, size%dx%d is offscreen; will not move", // g_debug("position %dx%d, size%dx%d is offscreen; will not move",
// pos[0], pos[1], geom[0], geom[1]); // pos[0], pos[1], geom[0], geom[1]);
} // }
else else
{ {
gtk_window_move(GTK_WINDOW(window), pos[0], pos[1]); gtk_window_move(GTK_WINDOW(window), pos[0], pos[1]);
@ -4714,8 +4715,11 @@ do_popup_menu(GncPluginPage *page, GdkEventButton *event)
button = 0; button = 0;
event_time = gtk_get_current_event_time (); event_time = gtk_get_current_event_time ();
} }
#if GTK_CHECK_VERSION(3,22,0)
gtk_menu_popup_at_pointer (GTK_MENU(menu), (GdkEvent *) event);
#else
gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, button, event_time); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, button, event_time);
#endif
LEAVE(" "); LEAVE(" ");
} }

Loading…
Cancel
Save