Commit cf70641e18748cfd9361b95d5c5667432dc797a7
1 parent
34b079ef
Exists in
master
and in
4 other branches
Fixing gtk version issues.
Showing
2 changed files
with
14 additions
and
0 deletions
Show diff stats
src/objects/toolbar/toolbar.c
| ... | ... | @@ -333,7 +333,11 @@ |
| 333 | 333 | debug("%s button_number=%d",__FUNCTION__,button_number); |
| 334 | 334 | |
| 335 | 335 | if(toolbar->popup.menu) { |
| 336 | +#if GTK_CHECK_VERSION(3,22,0) | |
| 336 | 337 | gtk_menu_popup_at_pointer(GTK_MENU(toolbar->popup.menu),NULL); |
| 338 | +#else | |
| 339 | + gtk_menu_popup(GTK_MENU(toolbar->popup.menu), NULL, NULL, NULL, NULL, 0, 0); | |
| 340 | +#endif | |
| 337 | 341 | } |
| 338 | 342 | |
| 339 | 343 | return TRUE; | ... | ... |
src/objects/window/page.c
| ... | ... | @@ -311,7 +311,12 @@ |
| 311 | 311 | |
| 312 | 312 | gtk_widget_show_all(popup); |
| 313 | 313 | gtk_menu_set_screen(GTK_MENU(popup), gtk_widget_get_screen(widget)); |
| 314 | + | |
| 315 | +#if GTK_CHECK_VERSION(3,22,0) | |
| 314 | 316 | gtk_menu_popup_at_pointer(GTK_MENU(popup), event); |
| 317 | +#else | |
| 318 | + gtk_menu_popup(GTK_MENU(popup), NULL, NULL, NULL, NULL, event->button, event->time); | |
| 319 | +#endif | |
| 315 | 320 | |
| 316 | 321 | return TRUE; |
| 317 | 322 | |
| ... | ... | @@ -328,7 +333,12 @@ |
| 328 | 333 | |
| 329 | 334 | gtk_widget_show_all(popup); |
| 330 | 335 | gtk_menu_set_screen(GTK_MENU(popup), gtk_widget_get_screen(widget)); |
| 336 | + | |
| 337 | +#if GTK_CHECK_VERSION(3,22,0) | |
| 331 | 338 | gtk_menu_popup_at_pointer(GTK_MENU(popup), event); |
| 339 | +#else | |
| 340 | + gtk_menu_popup(GTK_MENU(popup), NULL, NULL, NULL, NULL, event->button, event->time); | |
| 341 | +#endif | |
| 332 | 342 | |
| 333 | 343 | return TRUE; |
| 334 | 344 | } | ... | ... |