summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gtk/src/ghbcompat.h9
-rw-r--r--gtk/src/preview.c10
2 files changed, 14 insertions, 5 deletions
diff --git a/gtk/src/ghbcompat.h b/gtk/src/ghbcompat.h
index 0c5c6f21e..2acaa63b9 100644
--- a/gtk/src/ghbcompat.h
+++ b/gtk/src/ghbcompat.h
@@ -29,4 +29,13 @@ static inline gboolean gtk_widget_get_realized(GtkWidget *widget)
}
#endif
+#if !GTK_CHECK_VERSION(3, 10, 0)
+#define gtk_image_set_from_icon_name gtk_image_set_from_stock
+#define GHB_PLAY_ICON "gtk-media-play"
+#define GHB_PAUSE_ICON "gtk-media-pause"
+#else
+#define GHB_PLAY_ICON "media-playback-start"
+#define GHB_PAUSE_ICON "media-playback-pause"
+#endif
+
#endif // _GHB_COMPAT_H_
diff --git a/gtk/src/preview.c b/gtk/src/preview.c
index 561deb15a..3df9311e0 100644
--- a/gtk/src/preview.c
+++ b/gtk/src/preview.c
@@ -474,7 +474,7 @@ live_preview_cb(GstBus *bus, GstMessage *msg, gpointer data)
//printf("eos");
img = GTK_IMAGE(GHB_WIDGET(ud->builder, "live_preview_play_image"));
- gtk_image_set_from_stock(img, "gtk-media-play", GTK_ICON_SIZE_BUTTON);
+ gtk_image_set_from_icon_name(img, GHB_PLAY_ICON, GTK_ICON_SIZE_BUTTON);
gst_element_set_state(ud->preview->play, GST_STATE_PAUSED);
ud->preview->pause = TRUE;
gst_element_seek(ud->preview->play, 1.0,
@@ -664,14 +664,14 @@ live_preview_start(signal_user_data_t *ud)
img = GTK_IMAGE(GHB_WIDGET(ud->builder, "live_preview_play_image"));
if (!ud->preview->encoded[ud->preview->frame])
{
- gtk_image_set_from_stock(img, "gtk-media-play", GTK_ICON_SIZE_BUTTON);
+ gtk_image_set_from_icon_name(img, GHB_PLAY_ICON, GTK_ICON_SIZE_BUTTON);
gst_element_set_state(ud->preview->play, GST_STATE_NULL);
ud->preview->pause = TRUE;
return;
}
uri = g_strdup_printf("file://%s", ud->preview->current);
- gtk_image_set_from_stock(img, "gtk-media-pause", GTK_ICON_SIZE_BUTTON);
+ gtk_image_set_from_icon_name(img, GHB_PAUSE_ICON, GTK_ICON_SIZE_BUTTON);
ud->preview->state = PREVIEW_STATE_LIVE;
g_object_set(G_OBJECT(ud->preview->play), "uri", uri, NULL);
gst_element_set_state(ud->preview->play, GST_STATE_PLAYING);
@@ -688,7 +688,7 @@ live_preview_pause(signal_user_data_t *ud)
return;
img = GTK_IMAGE(GHB_WIDGET(ud->builder, "live_preview_play_image"));
- gtk_image_set_from_stock(img, "gtk-media-play", GTK_ICON_SIZE_BUTTON);
+ gtk_image_set_from_icon_name(img, GHB_PLAY_ICON, GTK_ICON_SIZE_BUTTON);
gst_element_set_state(ud->preview->play, GST_STATE_PAUSED);
ud->preview->pause = TRUE;
}
@@ -704,7 +704,7 @@ live_preview_stop(signal_user_data_t *ud)
return;
img = GTK_IMAGE(GHB_WIDGET(ud->builder, "live_preview_play_image"));
- gtk_image_set_from_stock(img, "gtk-media-play", GTK_ICON_SIZE_BUTTON);
+ gtk_image_set_from_icon_name(img, GHB_PLAY_ICON, GTK_ICON_SIZE_BUTTON);
#if defined(_ENABLE_GST)
gst_element_set_state(ud->preview->play, GST_STATE_NULL);
#endif