diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2015-09-15 14:41:29 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2015-09-15 14:41:29 -0500 |
commit | 21f9b84b4b729fbd7acbd465e7a3f726e4d20f91 (patch) | |
tree | eb2d091d427ca0813b445509d59cc8e27e8ad25f /yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch | |
parent | 101cef31e2bf54c678501155cd2106251acbd076 (diff) | |
parent | c124f4f2e04dca16a428a76c89677328bc7bf908 (diff) | |
download | blackbird-openbmc-21f9b84b4b729fbd7acbd465e7a3f726e4d20f91.tar.gz blackbird-openbmc-21f9b84b4b729fbd7acbd465e7a3f726e4d20f91.zip |
Merge commit 'c124f4f2e04dca16a428a76c89677328bc7bf908' as 'yocto-poky'
Diffstat (limited to 'yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch')
-rw-r--r-- | yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch b/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch new file mode 100644 index 000000000..7bf1b034b --- /dev/null +++ b/yocto-poky/meta/recipes-multimedia/gstreamer/gst-player/filechooser.patch @@ -0,0 +1,54 @@ +Upstream-Status: Submitted +Signed-off-by: Ross Burton <ross.burton@intel.com> + +From 43d4b19ab611d844156e26c4840cc54ddb73ae03 Mon Sep 17 00:00:00 2001 +From: Ross Burton <ross.burton@intel.com> +Date: Thu, 26 Feb 2015 17:17:05 +0000 +Subject: [PATCH] gtk-play: show a file chooser if no URIs were passed + +--- + gtk/gtk-play.c | 28 ++++++++++++++++++++++++++-- + 1 file changed, 26 insertions(+), 2 deletions(-) + +diff --git a/gtk/gtk-play.c b/gtk/gtk-play.c +index f015077..9766a72 100644 +--- a/gtk/gtk-play.c ++++ b/gtk/gtk-play.c +@@ -319,8 +319,32 @@ main (gint argc, gchar ** argv) + // FIXME: Add support for playlists and stuff + /* Parse the list of the file names we have to play. */ + if (!file_names) { +- g_print ("Usage: %s FILE(s)|URI(s)\n", APP_NAME); +- return 1; ++ GtkWidget *chooser; ++ int res; ++ ++ chooser = gtk_file_chooser_dialog_new ("Select files to play", NULL, ++ GTK_FILE_CHOOSER_ACTION_OPEN, ++ "_Cancel", GTK_RESPONSE_CANCEL, ++ "_Open", GTK_RESPONSE_ACCEPT, ++ NULL); ++ g_object_set (chooser, ++ "local-only", FALSE, ++ "select-multiple", TRUE, ++ NULL); ++ ++ res = gtk_dialog_run (GTK_DIALOG (chooser)); ++ if (res == GTK_RESPONSE_ACCEPT) { ++ GSList *l; ++ ++ l = gtk_file_chooser_get_uris (GTK_FILE_CHOOSER (chooser)); ++ while (l) { ++ play.uris = g_list_append (play.uris, l->data); ++ l = g_slist_delete_link (l, l); ++ } ++ } else { ++ return 0; ++ } ++ gtk_widget_destroy (chooser); + } else { + guint i; + +-- +1.7.10.4 + |