diff options
author | Thomas White <taw@physics.org> | 2020-09-24 15:21:25 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2020-09-24 15:21:25 +0200 |
commit | b98605e59db59aa889d471bab19157522cad7341 (patch) | |
tree | 418d69dc2fb91b1a633d8b78a3c35d409515c51c /src/crystfel_gui.c | |
parent | 1006bbd62dd2d33abd00dfc703e006c0c8d43b2f (diff) |
Optionally avoid very new GTK features, for better backwards compatibility
Diffstat (limited to 'src/crystfel_gui.c')
-rw-r--r-- | src/crystfel_gui.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c index a9f510c2..02196fa5 100644 --- a/src/crystfel_gui.c +++ b/src/crystfel_gui.c @@ -686,7 +686,13 @@ static gint image_info_clicked_sig(GtkWidget *widget, gtk_container_add(GTK_CONTAINER(popover), grid); gtk_widget_show_all(grid); + +#if GTK_CHECK_VERSION(3,22,0) gtk_popover_popup(GTK_POPOVER(popover)); +#else + gtk_widget_show_all(GTK_WIDGET(popover)); +#endif + return FALSE; } @@ -1093,7 +1099,7 @@ static void infobar_response_sig(GtkInfoBar *infobar, gint resp, } else if ( resp == GTK_RESPONSE_CLOSE ) { - gtk_info_bar_set_revealed(infobar, FALSE); + gtk_widget_destroy(GTK_WIDGET(infobar)); /* FIXME: Remove task from list */ } else { @@ -1171,7 +1177,10 @@ void add_running_task(struct crystfelproject *proj, G_CALLBACK(infobar_response_sig), task); gtk_widget_show_all(task->info_bar); + +#if GTK_CHECK_VERSION(3,22,29) gtk_info_bar_set_revealed(GTK_INFO_BAR(task->info_bar), TRUE); +#endif g_timeout_add(500, update_info_bar, task); } |