On Sun, Aug 7, 2016 at 10:34 AM, Robert Orzanna <email address hidden> wrote:
> Hi Osmo,
>
> So, now I compiled and tested the following attached test1.c file and
> yes, the mp3 file does show up in xbel! :-)
>
> Does the same also occur then for ogg files?
>
> Sunny greetings from Poland,
>
> ~Robert
>
> ** Attachment added: "test1.c"
> https://bugs.launchpad.net/audio-recorder/+bug/1610508/+
> attachment/4715904/+files/test1.c
>
> --
> You received this bug notification because you are subscribed to Audio
> Recorder.
> https://bugs.launchpad.net/bugs/1610508
>
> Title:
> Feature request: Always ask where to save file?
>
> Status in Audio Recorder:
> New
>
> Bug description:
> Dear all,
>
> My request origins from a discussion on AskUbuntu [1]. Currently,
> Audio Recorder doesn't write to the xbel file upon creation of a new
> file.
>
> This problem could be solved, I think, by a new optional setting to
> ask the user each time where to save the file. It would then write to
> xbel by prompting the GTK File Dialog window.
>
> What do you think of this request?
>
> Would you consider it useful?
>
> Thankfully,
>
> ~Robert
>
>
> [1] https://askubuntu.com/questions/803869/is-there-an-
> indicator-to-quickly-access-recently-used-files/804533?
> noredirect=1#comment1221806_804533
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/audio-recorder/+bug/1610508/+subscriptions
>
--
Sent from my PC, laptop or phone with Ubuntu-Linux.
Yes, I think the following code would work for any audio file.
One could set the mime-type more correctly, but I think "audio" is enough.
$ xdg-mime query filetype audio2.ogg
static void saveToXBel( GtkWidget *widget, gpointer data) {
g_print ("Saving to xbel.\n");
// Make URI (file:///....) of a filename moma/RR/ audio2. ogg";
// Some audio file with complete path ! NOTICE !
const gchar *file = "/home/
GError *error = NULL; to_uri( file, NULL, &error);
gchar *uri = g_filename_
if (error) { free(error) ;
g_print("Cannot make file uri of %s.\n", file);
g_error_
return;
}
GtkRecentManager *manager = gtk_recent_ manager_ get_default( );
GtkRecentData *recent_data = g_slice_new0 (GtkRecentData);
// $ xdg-mime query filetype audio1.mp3 data->mime_ type = "audio";
// Set correct mime type
recent_
recent_ data->app_ name = "Audio recorder"; data->is_ private = FALSE; data->app_ exec = "xdg-open %u"; manager_ add_full (manager, uri, recent_data);
recent_
recent_
gboolean ret = gtk_recent_
if (!ret) {
g_print("Error, cannot add to recent files. %s\n", uri);
}
g_slice_ free(GtkRecentD ata, recent_data);
g_free(uri);
}
On Sun, Aug 7, 2016 at 10:34 AM, Robert Orzanna <email address hidden> wrote:
> Hi Osmo, /bugs.launchpad .net/audio- recorder/ +bug/1610508/ + 4715904/ +files/ test1.c /bugs.launchpad .net/bugs/ 1610508 /askubuntu. com/questions/ 803869/ is-there- an- to-quickly- access- recently- used-files/ 804533? 1#comment122180 6_804533 /bugs.launchpad .net/audio- recorder/ +bug/1610508/ +subscriptions
>
> So, now I compiled and tested the following attached test1.c file and
> yes, the mp3 file does show up in xbel! :-)
>
> Does the same also occur then for ogg files?
>
> Sunny greetings from Poland,
>
> ~Robert
>
> ** Attachment added: "test1.c"
> https:/
> attachment/
>
> --
> You received this bug notification because you are subscribed to Audio
> Recorder.
> https:/
>
> Title:
> Feature request: Always ask where to save file?
>
> Status in Audio Recorder:
> New
>
> Bug description:
> Dear all,
>
> My request origins from a discussion on AskUbuntu [1]. Currently,
> Audio Recorder doesn't write to the xbel file upon creation of a new
> file.
>
> This problem could be solved, I think, by a new optional setting to
> ask the user each time where to save the file. It would then write to
> xbel by prompting the GTK File Dialog window.
>
> What do you think of this request?
>
> Would you consider it useful?
>
> Thankfully,
>
> ~Robert
>
>
> [1] https:/
> indicator-
> noredirect=
>
> To manage notifications about this bug go to:
> https:/
>
--
Sent from my PC, laptop or phone with Ubuntu-Linux.