summaryrefslogtreecommitdiffstats
path: root/audio/gnomemedia2
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2004-12-24 20:29:26 +0000
committermarcus <marcus@FreeBSD.org>2004-12-24 20:29:26 +0000
commitdf7cb16e5fc1852d6b124d4c08271088728d8a1f (patch)
treee9b624f91f5e3e2a80f6c31ef59a6ef3bf731d1a /audio/gnomemedia2
parent88fa3a95fd57f7d2c1fb49c5755eb9264f74717b (diff)
downloadFreeBSD-ports-df7cb16e5fc1852d6b124d4c08271088728d8a1f.zip
FreeBSD-ports-df7cb16e5fc1852d6b124d4c08271088728d8a1f.tar.gz
Fix saving in gnome-sound-recorder. See
http://bugzilla.gnome.org/show_bug.cgi?id=162185 for more details. Reported by: h <h@erathia.be>
Diffstat (limited to 'audio/gnomemedia2')
-rw-r--r--audio/gnomemedia2/Makefile2
-rw-r--r--audio/gnomemedia2/files/patch-grecord_gsr-window.c57
2 files changed, 58 insertions, 1 deletions
diff --git a/audio/gnomemedia2/Makefile b/audio/gnomemedia2/Makefile
index da20629..52f0782 100644
--- a/audio/gnomemedia2/Makefile
+++ b/audio/gnomemedia2/Makefile
@@ -7,7 +7,7 @@
PORTNAME= gnomemedia2
PORTVERSION= 2.8.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= audio gnome
MASTER_SITES= ${MASTER_SITE_GNOME}
MASTER_SITE_SUBDIR= sources/gnome-media/2.8
diff --git a/audio/gnomemedia2/files/patch-grecord_gsr-window.c b/audio/gnomemedia2/files/patch-grecord_gsr-window.c
new file mode 100644
index 0000000..7ed0b46
--- /dev/null
+++ b/audio/gnomemedia2/files/patch-grecord_gsr-window.c
@@ -0,0 +1,57 @@
+--- grecord/gsr-window.c.orig Fri Dec 24 15:16:11 2004
++++ grecord/gsr-window.c Fri Dec 24 15:16:13 2004
+@@ -29,7 +29,7 @@
+ #include <unistd.h>
+
+ #include <gnome.h>
+-#include <libgnomevfs/gnome-vfs-utils.h>
++#include <libgnomevfs/gnome-vfs.h>
+ #include <gconf/gconf-client.h>
+ #include <gst/gst.h>
+ #include <gst/gconf/gconf.h>
+@@ -475,16 +475,41 @@
+ {
+ GSRWindowPrivate *priv;
+ GMAudioProfile *profile;
+- char *tmp;
++ char *tmp, *src;
++ GnomeVFSURI *src_uri, *dst_uri;
+
+ priv = window->priv;
+
+ profile = gm_audio_profile_choose_get_active (priv->profile);
+
+- tmp = g_strdup_printf ("%s.%s", name,
++ tmp = g_strdup_printf ("file://%s.%s", name,
+ gm_audio_profile_get_extension (profile));
+- rename (priv->record_filename, tmp);
+- g_free (tmp);
++ src = g_strdup_printf ("file://%s", priv->record_filename);
++ src_uri = gnome_vfs_uri_new (src);
++ dst_uri = gnome_vfs_uri_new (tmp);
++ g_free (src);
++ g_free (tmp);
++ if (src_uri && dst_uri) {
++ GnomeVFSResult result;
++ result = gnome_vfs_xfer_uri (src_uri, dst_uri,
++ GNOME_VFS_XFER_DEFAULT,
++ GNOME_VFS_XFER_ERROR_MODE_ABORT,
++ GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE,
++ NULL, NULL);
++ if (result == GNOME_VFS_OK) {
++ char *title, *short_name;
++ priv->filename = g_strdup_printf ("%s.%s",
++ name, gm_audio_profile_get_extension (profile));
++ short_name = g_path_get_basename (priv->filename);
++ title = g_strdup_printf ("%s - Sound Recorder",
++ short_name);
++ gtk_window_set_title (GTK_WINDOW (window), title);
++ priv->dirty = FALSE;
++ g_free (title);
++ }
++ gnome_vfs_uri_unref (src_uri);
++ gnome_vfs_uri_unref (dst_uri);
++ }
+ }
+
+ static void
OpenPOWER on IntegriCloud